From ce4e8b2d38e2544787ef0cbd74596941463d8e18 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stephan=20Gro=C3=9Fberndt?= <stephan@grossberndt.de>
Date: Tue, 2 Jan 2018 14:49:33 +0100
Subject: [PATCH] [FOLLOWUP][BUGFIX] Add missing htmlspecialchars() and cleanup
 in DebuggerUtility

Add missing htmlspecialchars() calls in
EXT:extbase/Classes/Utility/DebuggerUtility.php and cleanup indents in
collections.

Resolves: #83450
Related: #83356
Releases: master
Change-Id: I85a82b7c88e91173485938e95436bad8677694c6
Reviewed-on: https://review.typo3.org/55242
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Reviewed-by: Oliver Klee <typo3-coding@oliverklee.de>
Reviewed-by: Alexander Opitz <opitz.alexander@googlemail.com>
Tested-by: Alexander Opitz <opitz.alexander@googlemail.com>
---
 typo3/sysext/extbase/Classes/Utility/DebuggerUtility.php | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/typo3/sysext/extbase/Classes/Utility/DebuggerUtility.php b/typo3/sysext/extbase/Classes/Utility/DebuggerUtility.php
index 2e2af045d5ec..a28ed40670e4 100644
--- a/typo3/sysext/extbase/Classes/Utility/DebuggerUtility.php
+++ b/typo3/sysext/extbase/Classes/Utility/DebuggerUtility.php
@@ -464,8 +464,9 @@ class DebuggerUtility
     {
         $dump = '';
         foreach ($collection as $key => $value) {
+            $dump .= PHP_EOL . str_repeat(self::PLAINTEXT_INDENT, $level);
             if ($plainText) {
-                $dump .= PHP_EOL . str_repeat(self::PLAINTEXT_INDENT, $level) . self::ansiEscapeWrap($key, '37', $ansiColors);
+                $dump .= self::ansiEscapeWrap($key, '37', $ansiColors);
             } else {
                 $dump .= '<span class="extbase-debug-property">' . htmlspecialchars($key) . '</span>';
             }
-- 
GitLab