Skip to content
Snippets Groups Projects
Commit 08a06f7f authored by Paul Ilea's avatar Paul Ilea
Browse files

[TASK] Viewhelper/Templates cleanup for escaped content

parent 7636e85c
No related branches found
No related tags found
No related merge requests found
......@@ -32,6 +32,17 @@ use TYPO3\CMS\Fluid\ViewHelpers\Be\AbstractBackendViewHelper;
* Abstract view helper
*/
class AbstractViewHelper extends AbstractBackendViewHelper {
/**
* @var boolean
*/
protected $escapeOutput = FALSE;
/**
* @var boolean
*/
protected $escapeChildren = FALSE;
/**
* Returns the base url of the site
*
......
......@@ -26,9 +26,9 @@ namespace SGalinski\SgMail\ViewHelpers\Backend;
* This copyright notice MUST APPEAR in all copies of the script!
***************************************************************/
use SGalinski\SgMail\ViewHelpers\AbstractViewHelper;
use TYPO3\CMS\Backend\Utility\BackendUtility;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper;
use TYPO3\CMS\Recordlist\RecordList\DatabaseRecordList;
/**
......
......@@ -26,8 +26,8 @@ namespace SGalinski\SgMail\ViewHelpers\Backend;
* This copyright notice MUST APPEAR in all copies of the script!
***************************************************************/
use SGalinski\SgMail\ViewHelpers\AbstractViewHelper;
use TYPO3\CMS\Backend\Utility\BackendUtility;
use TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper;
/**
* Class EditOnClickViewHelper
......
......@@ -26,11 +26,11 @@ namespace SGalinski\SgMail\ViewHelpers\Backend;
* This copyright notice MUST APPEAR in all copies of the script!
***************************************************************/
use SGalinski\SgMail\ViewHelpers\AbstractViewHelper;
use TYPO3\CMS\Backend\Utility\BackendUtility;
use TYPO3\CMS\Core\Imaging\Icon;
use TYPO3\CMS\Core\Imaging\IconFactory;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper;
/**
* Class IconViewHelper
......@@ -54,8 +54,8 @@ class IconViewHelper extends AbstractViewHelper {
. '</span>';
if ($clickMenu) {
return BackendUtility::wrapClickMenuOnIcon($iconImg, $table, $row['uid']);
} else {
return $iconImg;
}
return $iconImg;
}
}
......@@ -33,6 +33,16 @@ use TYPO3\CMS\Core\Utility\GeneralUtility;
*/
class UriViewHelper extends \TYPO3\CMS\Fluid\ViewHelpers\Widget\UriViewHelper {
/**
* @var boolean
*/
protected $escapeOutput = FALSE;
/**
* @var boolean
*/
protected $escapeChildren = FALSE;
/**
* Get the URI for a non-AJAX Request.
*
......
......@@ -158,7 +158,7 @@
<tr data-uid="{page.pid}">
<td nowrap="nowrap" class="col-title">
<a href="#" onclick="sgMailGoToPage({page.uid}, '{page.path}'); return false;">
<f:format.raw><sgm:backend.icon table="pages" row="{page}" clickMenu="0" /> {page._thePathFull}</f:format.raw>
<sgm:backend.icon table="pages" row="{page}" clickMenu="0" /> {page._thePathFull}
</a>
</td>
</tr>
......
......@@ -29,12 +29,10 @@
</thead>
<tbody>
<f:for each="{paginatedMails}" as="mail">
{sgm:backend.editOnClick(table: 'tx_sgmail_domain_model_mail', uid: mail.uid) -> sgm:set(name: 'editOnClick') -> f:format.raw()}
{sgm:backend.editOnClick(table: 'tx_sgmail_domain_model_mail', uid: mail.uid) -> sgm:set(name: 'editOnClick')}
<tr data-uid="{mail.uid}">
<td nowrap="nowrap" class="col-icon">
<f:format.raw>
<sgm:backend.icon table="tx_sgmail_domain_model_mail" row="{mail}" />
</f:format.raw>
<sgm:backend.icon table="tx_sgmail_domain_model_mail" row="{mail}" />
</td>
<td>
<span>{mail.from_address}</span>
......@@ -67,9 +65,7 @@
</f:if>
</td>
<td nowrap="nowrap" class="col-control">
<f:format.raw>
<sgm:backend.control table="tx_sgmail_domain_model_mail" row="{mail}" />
</f:format.raw>
<sgm:backend.control table="tx_sgmail_domain_model_mail" row="{mail}" />
</td>
<td>
<f:link.action class="btn btn-default btn-send-now" controller="Queue" action="sendMail" arguments="{uid: mail.uid, selectedTemplate: selectedTemplateKey, selectedExtension: selectedExtensionKey}">
......@@ -125,7 +121,7 @@
<tr data-uid="{page.pid}">
<td nowrap="nowrap" class="col-title">
<a href="#" onclick="sgMailGoToPage({page.uid}, '{page.path}'); return false;">
<f:format.raw><sgm:backend.icon table="pages" row="{page}" clickMenu="0" /> {page._thePathFull}</f:format.raw>
<sgm:backend.icon table="pages" row="{page}" clickMenu="0" /> {page._thePathFull}
</a>
</td>
</tr>
......
......@@ -72,7 +72,7 @@
<form id="paginator-form-{position}" onsubmit="goToPage{position}(this); return false;" style="display:inline;">
<script type="text/javascript">
function goToPage{position}(formObject) {
var url = '{sg:widget.uri(arguments:{currentPage: 987654321}) -> f:format.raw()}';
var url = '{sg:widget.uri(arguments:{currentPage: 987654321})}';
var page = formObject.elements['paginator-target-page'].value;
if (page > {pagination.numberOfPages}) {
page = {pagination.numberOfPages};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment