Commit de678f23 authored by Markus Klein's avatar Markus Klein Committed by Christian Kuhn
Browse files

[BUGFIX] Debugger output: split lines before escaping them

This fixes the issue that lines are wrapped within a HTML entity.

Resolves: #79398
Releases: master, 7.6
Change-Id: I0bf1722cb9792fea0f45421fe1f72e1932879002
Reviewed-on: https://review.typo3.org/51369

Tested-by: default avatarTYPO3com <no-reply@typo3.com>
Reviewed-by: default avatarDominique Kreemers <dominique.kreemers@icloud.com>
Tested-by: default avatarDominique Kreemers <dominique.kreemers@icloud.com>
Reviewed-by: Georg Ringer's avatarGeorg Ringer <georg.ringer@gmail.com>
Tested-by: Georg Ringer's avatarGeorg Ringer <georg.ringer@gmail.com>
Reviewed-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
parent 8703d364
......@@ -103,7 +103,9 @@ class DebuggerUtility
if ($plainText) {
$dump = self::ansiEscapeWrap(('"' . implode((PHP_EOL . str_repeat(self::PLAINTEXT_INDENT, ($level + 1))), str_split($croppedValue, 76)) . '"'), '33', $ansiColors) . ' (' . strlen($value) . ' chars)';
} else {
$dump = sprintf('\'<span class="extbase-debug-string">%s</span>\' (%s chars)', implode('<br />' . str_repeat(self::HTML_INDENT, ($level + 1)), str_split(htmlspecialchars($croppedValue), 76)), strlen($value));
$lines = str_split($croppedValue, 76);
$lines = array_map('htmlspecialchars', $lines);
$dump = sprintf('\'<span class="extbase-debug-string">%s</span>\' (%s chars)', implode('<br />' . str_repeat(self::HTML_INDENT, $level + 1), $lines), strlen($value));
}
} elseif (is_numeric($value)) {
$dump = sprintf('%s (%s)', self::ansiEscapeWrap($value, '35', $ansiColors), gettype($value));
......
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