Skip to content

Commit

Permalink
[BUGFIX] Use correct ordering of nl2br & htmlspecialchars
Browse files Browse the repository at this point in the history
The ViewHelper `f:format.nl2br` must be applied after
`f:format.htmlspecialchars()`.

Resolves: #99160
Releases: main, 11.5
Change-Id: If20a25cf86479fa8d8e533fc5d820dc6931c3a5b
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/76774
Tested-by: Nikita Hovratov <nikita.h@live.de>
Tested-by: core-ci <typo3@b13.com>
Reviewed-by: Nikita Hovratov <nikita.h@live.de>
  • Loading branch information
georgringer authored and nhovratov committed Nov 22, 2022
1 parent 550c250 commit f640747
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Expand Up @@ -367,8 +367,8 @@ protected function getAppendWizards(array $wizardElements): array
*/
protected function getWizardItem(array $itemConf): array
{
$itemConf['title'] = $this->getLanguageService()->sL($itemConf['title'] ?? '');
$itemConf['description'] = $this->getLanguageService()->sL($itemConf['description'] ?? '');
$itemConf['title'] = trim($this->getLanguageService()->sL($itemConf['title'] ?? ''));
$itemConf['description'] = trim($this->getLanguageService()->sL($itemConf['description'] ?? ''));
$itemConf['saveAndClose'] = (bool)($itemConf['saveAndClose'] ?? false);
$itemConf['tt_content_defValues'] = $itemConf['tt_content_defValues.'] ?? [];
unset($itemConf['tt_content_defValues.']);
Expand Down
Expand Up @@ -23,6 +23,6 @@
<div class="media-body">
<strong>{wizardInformation.title -> f:format.htmlspecialchars()}</strong>
<br/>
{wizardInformation.description -> f:format.nl2br() -> f:format.htmlspecialchars()}
{wizardInformation.description -> f:format.htmlspecialchars() -> f:format.nl2br()}
</div>
</f:section>

0 comments on commit f640747

Please sign in to comment.