Commit 471f94cd authored by Marco Huber's avatar Marco Huber Committed by Wouter Wolters
Browse files

[BUGFIX] remove unnecessary htmlspecialchars

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's avatarGeorg Ringer <georg.ringer@gmail.com>
Tested-by: Georg Ringer's avatarGeorg Ringer <georg.ringer@gmail.com>
Reviewed-by: Wouter Wolters's avatarWouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters's avatarWouter Wolters <typo3@wouterwolters.nl>
parent 3d230591
......@@ -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
);
......
......@@ -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 */
......
......@@ -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);
......
......@@ -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();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment