From aaf3390e5db89dfa07596008e5972ce4190b8069 Mon Sep 17 00:00:00 2001
From: Wouter Wolters <typo3@wouterwolters.nl>
Date: Fri, 11 Nov 2016 21:30:46 +0100
Subject: [PATCH] [TASK] Remove htmlspecialchars for values that are used in
 exceptions

Resolves: #78663
Releases: master
Change-Id: Ic7bcc67886d66d31d2062847568d800ab4e48717
Reviewed-on: https://review.typo3.org/50598
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Georg Ringer <georg.ringer@gmail.com>
Tested-by: Georg Ringer <georg.ringer@gmail.com>
Reviewed-by: Jigal van Hemert <jigal.van.hemert@typo3.org>
Tested-by: Jigal van Hemert <jigal.van.hemert@typo3.org>
---
 .../Classes/Controller/File/CreateFolderController.php        | 4 ++--
 .../backend/Classes/Controller/File/EditFileController.php    | 4 ++--
 .../backend/Classes/Controller/File/FileUploadController.php  | 4 ++--
 .../backend/Classes/Controller/File/RenameFileController.php  | 4 ++--
 .../backend/Classes/Controller/File/ReplaceFileController.php | 4 ++--
 5 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/typo3/sysext/backend/Classes/Controller/File/CreateFolderController.php b/typo3/sysext/backend/Classes/Controller/File/CreateFolderController.php
index e17fd2c6fb04..05de874ed63d 100644
--- a/typo3/sysext/backend/Classes/Controller/File/CreateFolderController.php
+++ b/typo3/sysext/backend/Classes/Controller/File/CreateFolderController.php
@@ -107,8 +107,8 @@ class CreateFolderController extends AbstractModule
         }
         // Cleaning and checking target directory
         if (!$this->folderObject) {
-            $title = htmlspecialchars($this->getLanguageService()->sL('LLL:EXT:lang/locallang_mod_file_list.xlf:paramError'));
-            $message = htmlspecialchars($this->getLanguageService()->sL('LLL:EXT:lang/locallang_mod_file_list.xlf:targetNoDir'));
+            $title = $this->getLanguageService()->sL('LLL:EXT:lang/locallang_mod_file_list.xlf:paramError');
+            $message = $this->getLanguageService()->sL('LLL:EXT:lang/locallang_mod_file_list.xlf:targetNoDir');
             throw new \RuntimeException($title . ': ' . $message, 1294586845);
         }
         if ($this->folderObject->getStorage()->getUid() === 0) {
diff --git a/typo3/sysext/backend/Classes/Controller/File/EditFileController.php b/typo3/sysext/backend/Classes/Controller/File/EditFileController.php
index 4a041ab29384..6f91a53e14ad 100644
--- a/typo3/sysext/backend/Classes/Controller/File/EditFileController.php
+++ b/typo3/sysext/backend/Classes/Controller/File/EditFileController.php
@@ -106,8 +106,8 @@ class EditFileController extends AbstractModule
         }
         // Cleaning and checking target directory
         if (!$this->fileObject) {
-            $title = htmlspecialchars($this->getLanguageService()->sL('LLL:EXT:lang/locallang_mod_file_list.xlf:paramError'));
-            $message = htmlspecialchars($this->getLanguageService()->sL('LLL:EXT:lang/locallang_mod_file_list.xlf:targetNoDir'));
+            $title = $this->getLanguageService()->sL('LLL:EXT:lang/locallang_mod_file_list.xlf:paramError');
+            $message = $this->getLanguageService()->sL('LLL:EXT:lang/locallang_mod_file_list.xlf:targetNoDir');
             throw new \RuntimeException($title . ': ' . $message, 1294586841);
         }
         if ($this->fileObject->getStorage()->getUid() === 0) {
diff --git a/typo3/sysext/backend/Classes/Controller/File/FileUploadController.php b/typo3/sysext/backend/Classes/Controller/File/FileUploadController.php
index 4ca56195e147..0d4483340e00 100644
--- a/typo3/sysext/backend/Classes/Controller/File/FileUploadController.php
+++ b/typo3/sysext/backend/Classes/Controller/File/FileUploadController.php
@@ -103,8 +103,8 @@ class FileUploadController extends AbstractModule
 
         // Cleaning and checking target directory
         if (!$this->folderObject) {
-            $title = htmlspecialchars($this->getLanguageService()->sL('LLL:EXT:lang/locallang_mod_file_list.xlf:paramError'));
-            $message = htmlspecialchars($this->getLanguageService()->sL('LLL:EXT:lang/locallang_mod_file_list.xlf:targetNoDir'));
+            $title = $this->getLanguageService()->sL('LLL:EXT:lang/locallang_mod_file_list.xlf:paramError');
+            $message = $this->getLanguageService()->sL('LLL:EXT:lang/locallang_mod_file_list.xlf:targetNoDir');
             throw new \RuntimeException($title . ': ' . $message, 1294586843);
         }
 
diff --git a/typo3/sysext/backend/Classes/Controller/File/RenameFileController.php b/typo3/sysext/backend/Classes/Controller/File/RenameFileController.php
index 99190f010a7e..d28b2f7550f3 100644
--- a/typo3/sysext/backend/Classes/Controller/File/RenameFileController.php
+++ b/typo3/sysext/backend/Classes/Controller/File/RenameFileController.php
@@ -88,8 +88,8 @@ class RenameFileController extends AbstractModule
             $this->fileOrFolderObject = \TYPO3\CMS\Core\Resource\ResourceFactory::getInstance()->retrieveFileOrFolderObject($this->target);
         }
         if (!$this->fileOrFolderObject) {
-            $title = htmlspecialchars($this->getLanguageService()->sL('LLL:EXT:lang/locallang_mod_file_list.xlf:paramError'));
-            $message = htmlspecialchars($this->getLanguageService()->sL('LLL:EXT:lang/locallang_mod_file_list.xlf:targetNoDir'));
+            $title = $this->getLanguageService()->sL('LLL:EXT:lang/locallang_mod_file_list.xlf:paramError');
+            $message = $this->getLanguageService()->sL('LLL:EXT:lang/locallang_mod_file_list.xlf:targetNoDir');
             throw new \RuntimeException($title . ': ' . $message, 1294586844);
         }
         if ($this->fileOrFolderObject->getStorage()->getUid() === 0) {
diff --git a/typo3/sysext/backend/Classes/Controller/File/ReplaceFileController.php b/typo3/sysext/backend/Classes/Controller/File/ReplaceFileController.php
index 3574e01412fd..a749f2e8188b 100644
--- a/typo3/sysext/backend/Classes/Controller/File/ReplaceFileController.php
+++ b/typo3/sysext/backend/Classes/Controller/File/ReplaceFileController.php
@@ -104,8 +104,8 @@ class ReplaceFileController extends AbstractModule
                 ->retrieveFileOrFolderObject('file:' . $this->uid);
         }
         if (!$this->fileOrFolderObject) {
-            $title = htmlspecialchars($lang->sL('LLL:EXT:lang/locallang_mod_file_list.xlf:paramError'));
-            $message = htmlspecialchars($lang->sL('LLL:EXT:lang/locallang_mod_file_list.xlf:targetNoDir'));
+            $title = $lang->sL('LLL:EXT:lang/locallang_mod_file_list.xlf:paramError');
+            $message = $lang->sL('LLL:EXT:lang/locallang_mod_file_list.xlf:targetNoDir');
             throw new \RuntimeException($title . ': ' . $message, 1436895930);
         }
         if ($this->fileOrFolderObject->getStorage()->getUid() === 0) {
-- 
GitLab