|
4 | 4 | * @var Framework\Debug\ExceptionHandler $handler |
5 | 5 | */ |
6 | 6 |
|
| 7 | +use Framework\Debug\Debugger as D; |
7 | 8 | use Framework\Helpers\ArraySimple; |
8 | 9 |
|
9 | 10 | $lang = static function (string $line, array $args = []) use ($handler) : string { |
|
19 | 20 | <meta name="robots" content="noindex"> |
20 | 21 | <meta name="viewport" content="width=device-width, initial-scale=1"> |
21 | 22 | <title><?= $lang('exception') ?>: <?= |
22 | | - htmlentities($exception->getMessage()) ?></title> |
| 23 | + D::esc($exception->getMessage()) ?></title> |
23 | 24 | <link rel="shortcut icon" href="data:image/png;base64,<?= base64_encode((string) file_get_contents(__DIR__ . '/favicons/development.png')) ?>"> |
24 | 25 | <style> |
25 | 26 | <?= file_get_contents(__DIR__ . '/../assets/prism-aplus.css') ?> |
|
253 | 254 | <small><?= $lang('exception') ?>:</small> |
254 | 255 | <h1><?= $exception::class ?></h1> |
255 | 256 | <small><?= $lang('message') ?>:</small> |
256 | | - <h2><?= htmlentities($exception->getMessage()) ?></h2> |
| 257 | + <h2><?= D::esc($exception->getMessage()) ?></h2> |
257 | 258 | <div class="search-section"> |
258 | 259 | <span><?= $lang('searchWith') ?>:</span> |
259 | 260 | <?php |
|
272 | 273 | <section class="file"> |
273 | 274 | <div> |
274 | 275 | <small><?= $lang('file') ?>:</small> |
275 | | - <h3><?= htmlentities($exception->getFile()) ?></h3> |
| 276 | + <h3><?= D::esc($exception->getFile()) ?></h3> |
276 | 277 | </div> |
277 | 278 | <div class="line"> |
278 | 279 | <small><?= $lang('line') ?>:</small> |
|
338 | 339 | } |
339 | 340 | } |
340 | 341 | ?></div> |
341 | | - <pre class="code"><code class="language-php"><?= htmlentities($pre) ?></code></pre> |
| 342 | + <pre class="code"><code class="language-php"><?= D::esc($pre) ?></code></pre> |
342 | 343 | </dd> |
343 | 344 | </dl> |
344 | 345 | <?php else : ?> |
|
403 | 404 | } |
404 | 405 | ?> |
405 | 406 | <tr> |
406 | | - <th><?= htmlentities($field) ?></th> |
407 | | - <td><?= htmlentities((string) $value) ?></td> |
| 407 | + <th><?= D::esc($field) ?></th> |
| 408 | + <td><?= D::esc((string) $value) ?></td> |
408 | 409 | </tr> |
409 | 410 | <?php |
410 | 411 | endforeach |
|
429 | 430 | </tr> |
430 | 431 | <tr> |
431 | 432 | <th><?= $lang('level') ?></th> |
432 | | - <td><?= htmlentities($log->level->name) ?></td> |
| 433 | + <td><?= D::esc($log->level->name) ?></td> |
433 | 434 | </tr> |
434 | 435 | <tr> |
435 | 436 | <th><?= $lang('id') ?></th> |
436 | | - <td><?= htmlentities($log->id) ?></td> |
| 437 | + <td><?= D::esc($log->id) ?></td> |
437 | 438 | </tr> |
438 | 439 | <tr> |
439 | 440 | <th><?= $lang('message') ?></th> |
440 | 441 | <td dir="ltr"> |
441 | | - <pre><code class="language-log"><?= htmlentities($log->message) ?></code></pre> |
| 442 | + <pre><code class="language-log"><?= D::esc($log->message) ?></code></pre> |
442 | 443 | </td> |
443 | 444 | </tr> |
444 | 445 | </table> |
|
0 commit comments