[ErrorHandler] Escape JSON encoded log context

This commit is contained in:
Roland Franssen 2020-09-22 18:24:16 +02:00 committed by GitHub
parent 50f37f0ccc
commit 5572a68ed7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -35,7 +35,7 @@
<td>
<?= $this->formatLogMessage($log['message'], $log['context']); ?>
<?php if ($log['context']) { ?>
<pre class="text-muted prewrap m-t-5"><?= json_encode($log['context'], \JSON_PRETTY_PRINT | \JSON_UNESCAPED_UNICODE | \JSON_UNESCAPED_SLASHES); ?></pre>
<pre class="text-muted prewrap m-t-5"><?= $this->escape(json_encode($log['context'], \JSON_PRETTY_PRINT | \JSON_UNESCAPED_UNICODE | \JSON_UNESCAPED_SLASHES)); ?></pre>
<?php } ?>
</td>
</tr>