8000 [Debug] HTML-escape array key · symfony/symfony@1ebbabd · GitHub
[go: up one dir, main page]

Skip to content

Commit 1ebbabd

Browse files
committed
[Debug] HTML-escape array key
1 parent c96d903 commit 1ebbabd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Component/Debug/ExceptionHandler.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,7 @@ private function formatArgs(array $args)
419419
$formattedValue = str_replace("\n", '', var_export($this->escapeHtml((string) $item[1]), true));
420420
}
421421

422-
$result[] = is_int($key) ? $formattedValue : sprintf("'%s' => %s", $key, $formattedValue);
422+
$result[] = is_int($key) ? $formattedValue : sprintf("'%s' => %s", $this->escapeHtml($key), $formattedValue);
423423
}
424424

425425
return implode(', ', $result);

0 commit comments

Comments
 (0)
0