Skip to content

Commit a8dce3f

Browse files
Fix bad merge
1 parent bfec2f3 commit a8dce3f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Bridge/Twig/Extension/CodeExtension.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ public function formatArgs(array $args): string
100100
} elseif (preg_match('/[^\x07-\x0D\x1B\x20-\xFF]/', $item[1])) {
101101
$formattedValue = '<em>binary string</em>';
102102
} else {
103-
$formattedValue = str_replace("\n", '', $this->escape(var_export($item[1], true)));
103+
$formattedValue = str_replace("\n", '', htmlspecialchars(var_export($item[1], true), \ENT_COMPAT | \ENT_SUBSTITUTE, $this->charset));
104104
}
105105

106106
$result[] = \is_int($key) ? $formattedValue : sprintf("'%s' => %s", htmlspecialchars($key, \ENT_COMPAT | \ENT_SUBSTITUTE, $this->charset), $formattedValue);

0 commit comments

Comments
 (0)