From 9481a4988a20b8f5436cd679b42ba9df90a15203 Mon Sep 17 00:00:00 2001
From: Wouter Wolters <typo3@wouterwolters.nl>
Date: Tue, 8 Nov 2016 21:59:29 +0100
Subject: [PATCH] [BUGFIX] Fix double escaping of icon and title in EXT:impexp

The title and icon are double escaped. This leads to HTML output
as readable code. Move translation into the controller.

Resolves: #76277
Releases: master,7.6
Change-Id: I5529e00788ea870475d4b46f2da9dd472d226a97
Reviewed-on: https://review.typo3.org/50548
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Michael Oehlhof <typo3@oehlhof.de>
Tested-by: Michael Oehlhof <typo3@oehlhof.de>
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
---
 .../impexp/Classes/Controller/ImportExportController.php      | 4 ++--
 .../Resources/Private/Partials/Export/Configuration.html      | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/typo3/sysext/impexp/Classes/Controller/ImportExportController.php b/typo3/sysext/impexp/Classes/Controller/ImportExportController.php
index 272ca51bb038..aed779e02d78 100644
--- a/typo3/sysext/impexp/Classes/Controller/ImportExportController.php
+++ b/typo3/sysext/impexp/Classes/Controller/ImportExportController.php
@@ -738,9 +738,9 @@ class ImportExportController extends BaseScriptClass
                         $iconAndTitle = $this->iconFactory->getIconForRecord('pages', $record, Icon::SIZE_SMALL)->render()
                             . BackendUtility::getRecordTitle('pages', $record, true);
                     }
+
                     $tableList[] = [
-                        'tableName' => $tableName,
-                        'iconAndTitle' => $iconAndTitle,
+                        'iconAndTitle' => sprintf($this->lang->getLL('makeconfig_tableListEntry'), $tableName, $iconAndTitle),
                         'reference' => $reference
                     ];
                 }
diff --git a/typo3/sysext/impexp/Resources/Private/Partials/Export/Configuration.html b/typo3/sysext/impexp/Resources/Private/Partials/Export/Configuration.html
index d0a258059573..cf2b05686c8a 100644
--- a/typo3/sysext/impexp/Resources/Private/Partials/Export/Configuration.html
+++ b/typo3/sysext/impexp/Resources/Private/Partials/Export/Configuration.html
@@ -78,7 +78,7 @@
 		</div>
 		<div class="col-sm-10">
 			<f:for each="{tableList}" as="table">
-				<f:translate key="makeconfig_tableListEntry" arguments="{0: table.tableName, 1: table.iconAndTitle}" />
+				<f:format.raw>{table.iconAndTitle}</f:format.raw>
 				<f:form.hidden name="tx_impexp[list][]" value="{table.reference}" />
 				<br />
 			</f:for>
-- 
GitLab