[BUGFIX] remove unnecessary htmlspecialchars 45/46245/2
authorMarco Huber <mail@marco-huber.de>
Tue, 26 Jan 2016 12:52:28 +0000 (13:52 +0100)
committerWouter Wolters <typo3@wouterwolters.nl>
Thu, 28 Jan 2016 21:51:32 +0000 (22:51 +0100)
The message is sent through htmlspecialchars in
TYPO3\CMS\Core\Messaging\FlashMessageQueue::renderFlashMessages(),
so we don't need it here.

Fixes: #72948
Releases: master,7.6
Change-Id: I90854bcf1d38ef9c2eaa4898b448ca8c9458f14e
Reviewed-on: https://review.typo3.org/46245
Reviewed-by: Georg Ringer <georg.ringer@gmail.com>
Tested-by: Georg Ringer <georg.ringer@gmail.com>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
typo3/sysext/backend/Classes/Controller/EditDocumentController.php
typo3/sysext/backend/Classes/Controller/PageLayoutController.php
typo3/sysext/backend/Classes/Form/Element/GroupElement.php
typo3/sysext/core/Classes/DataHandling/DataHandler.php

index 1e5a620..6baf041 100644 (file)
@@ -1092,7 +1092,7 @@ class EditDocumentController extends AbstractModule
                                         /** @var $flashMessage \TYPO3\CMS\Core\Messaging\FlashMessage */
                                         $flashMessage = GeneralUtility::makeInstance(
                                             FlashMessage::class,
-                                            htmlspecialchars($lockInfo['msg']),
+                                            $lockInfo['msg'],
                                             '',
                                             FlashMessage::WARNING
                                         );
index 1167122..f0cada5 100755 (executable)
@@ -822,7 +822,7 @@ class PageLayoutController
                     $lockInfo = BackendUtility::isRecordLocked($tableName, $formData['databaseRow']['uid']);
                     if ($lockInfo) {
                         /** @var \TYPO3\CMS\Core\Messaging\FlashMessage $flashMessage */
-                        $flashMessage = GeneralUtility::makeInstance(FlashMessage::class, htmlspecialchars($lockInfo['msg']), '', FlashMessage::WARNING);
+                        $flashMessage = GeneralUtility::makeInstance(FlashMessage::class, $lockInfo['msg'], '', FlashMessage::WARNING);
                         /** @var $flashMessageService \TYPO3\CMS\Core\Messaging\FlashMessageService */
                         $flashMessageService = GeneralUtility::makeInstance(FlashMessageService::class);
                         /** @var $defaultFlashMessageQueue \TYPO3\CMS\Core\Messaging\FlashMessageQueue */
index 59bc95d..02b6589 100644 (file)
@@ -174,7 +174,7 @@ class GroupElement extends AbstractFormElement
                                 $message = $exception->getMessage();
                                 $flashMessage = GeneralUtility::makeInstance(
                                     FlashMessage::class,
-                                    htmlspecialchars($message), '', FlashMessage::ERROR, true
+                                    $message, '', FlashMessage::ERROR, true
                                 );
                                 /** @var $flashMessageService FlashMessageService */
                                 $flashMessageService = GeneralUtility::makeInstance(FlashMessageService::class);
index 260fca1..a774945 100644 (file)
@@ -4937,7 +4937,7 @@ class DataHandler
             }
         } else {
             /** @var FlashMessage $flashMessage */
-            $flashMessage = GeneralUtility::makeInstance(FlashMessage::class, htmlspecialchars($res), '', FlashMessage::ERROR, true);
+            $flashMessage = GeneralUtility::makeInstance(FlashMessage::class, $res, '', FlashMessage::ERROR, true);
             /** @var $flashMessageService FlashMessageService */
             $flashMessageService = GeneralUtility::makeInstance(FlashMessageService::class);
             /** @var $defaultFlashMessageQueue \TYPO3\CMS\Core\Messaging\FlashMessageQueue */
@@ -7930,7 +7930,7 @@ class DataHandler
             $log_data = unserialize($row['log_data']);
             $msg = $row['error'] . ': ' . sprintf($row['details'], $log_data[0], $log_data[1], $log_data[2], $log_data[3], $log_data[4]);
             /** @var FlashMessage $flashMessage */
-            $flashMessage = GeneralUtility::makeInstance(FlashMessage::class, htmlspecialchars($msg), '', FlashMessage::ERROR, true);
+            $flashMessage = GeneralUtility::makeInstance(FlashMessage::class, $msg, '', FlashMessage::ERROR, true);
             /** @var $flashMessageService FlashMessageService */
             $flashMessageService = GeneralUtility::makeInstance(FlashMessageService::class);
             $defaultFlashMessageQueue = $flashMessageService->getMessageQueueByIdentifier();