Clean up and improve escaping on public-facing error pages.
This commit is contained in:
parent
c0e975294e
commit
5502087cb0
|
@ -1,17 +1,27 @@
|
|||
<?php
|
||||
/**
|
||||
* @var Exception $exception
|
||||
* @var App\Environment $environment
|
||||
*/
|
||||
|
||||
$this->layout('minimal', [
|
||||
'title' => 'Error',
|
||||
'page_class' => 'error-content'
|
||||
'page_class' => 'error-content',
|
||||
]);
|
||||
|
||||
$filePath = Symfony\Component\Filesystem\Path::makeRelative(
|
||||
$exception->getFile(),
|
||||
$environment->getBaseDirectory()
|
||||
);
|
||||
?>
|
||||
|
||||
<div class="public-page">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<h2 class="display-1 mt-2">500</h2>
|
||||
<p>
|
||||
<?= $exception->getMessage() ?><br>
|
||||
<?= basename($exception->getFile()) ?> : <?= $exception->getLine() ?>
|
||||
<h2 class="display-1">500</h2>
|
||||
<h4><?= $this->e($exception->getMessage()) ?></h4>
|
||||
<p class="text-muted card-text mb-0">
|
||||
<?= $this->e($filePath) ?> : L<?= $exception->getLine() ?>
|
||||
</p>
|
||||
|
||||
<a role="button" title="<?= __('Dashboard') ?>" class="btn btn-login btn-primary btn-float" href="/">
|
||||
|
|
|
@ -10,11 +10,13 @@ $this->layout('minimal', [
|
|||
<div class="public-page">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<h2 class="display-2 mt-2"><?=$exception->getCode()?></h2>
|
||||
<h4><?=$exception->getMessage()?></h4>
|
||||
<p><?=$exception->getDescription()?></p>
|
||||
<h2 class="display-1"><?= $this->e($exception->getCode()) ?></h2>
|
||||
<h4><?= $this->e($exception->getMessage()) ?></h4>
|
||||
<p class="text-muted card-text mb-0">
|
||||
<?= $this->e($exception->getDescription()) ?>
|
||||
</p>
|
||||
|
||||
<a role="button" title="<?=__('Dashboard')?>" class="btn btn-login btn-primary btn-float"
|
||||
<a role="button" title="<?= __('Dashboard') ?>" class="btn btn-login btn-primary btn-float"
|
||||
href="/">
|
||||
<i class="material-icons" aria-hidden="true">home</i>
|
||||
</a>
|
||||
|
|
Loading…
Reference in New Issue