8000 bug #38271 [ErrorHandler] Escape JSON encoded log context (ro0NL) · symfony/symfony@02be26a · GitHub
[go: up one dir, main page]

Skip to content

Commit 02be26a

Browse files
committed
bug #38271 [ErrorHandler] Escape JSON encoded log context (ro0NL)
This PR was merged into the 4.4 branch. Discussion ---------- [ErrorHandler] Escape JSON encoded log context | Q | A | ------------- | --- | Branch? | 4.4 | Bug fix? | yes | New feature? | no | Deprecations? | eno <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files --> | Tickets | Fix #... <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead --> | License | MIT | Doc PR | symfony/symfony-docs#... <!-- required for new features --> Fixes #35569 (comment) Fixes #35569 (comment) The initial issue remains though (the webprofiler showing the logs tab in the exception panel), i'll try to give it another look sometime, but this is a quick win nevertheless. cc @yceruto Commits ------- 5572a68 [ErrorHandler] Escape JSON encoded log context
2 parents 966dc58 + 5572a68 commit 02be26a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Component/ErrorHandler/Resources/views/logs.html.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
<td>
3636
<?= $this->formatLogMessage($log['message'], $log['context']); ?>
3737
<?php if ($log['context']) { ?>
38-
<pre class="text-muted prewrap m-t-5"><?= json_encode($log['context'], \JSON_PRETTY_PRINT | \JSON_UNESCAPED_UNICODE | \JSON_UNESCAPED_SLASHES); ?></pre>
38+
<pre class="text-muted prewrap m-t-5"><?= $this->escape(json_encode($log['context'], \JSON_PRETTY_PRINT | \JSON_UNESCAPED_UNICODE | \JSON_UNESCAPED_SLASHES)); ?></pre>
3939
<?php } ?>
4040
</td>
4141
</tr>

0 commit comments

Comments
 (0)
0