Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions formwork/views/errors/partials/debug.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
</div>
<div class="error-debug-details">
<h3>Uncaught <code><?= $throwable::class ?></code>: <?= $throwable->getMessage() ?></h3>
<h3>Uncaught <code><?= $throwable::class ?></code>: <?= $this->escape($throwable->getMessage()) ?></h3>
<?php foreach ($stackTrace as $i => $frame) : ?>
<?php if (isset($frame['file'], $frame['line'])): ?>
<details <?= $this->attr(['open' => $i === 0]) ?>>
<summary><a class="error-debug-editor-uri" href="<?= Formwork\Utils\Str::interpolate($app->config()->get('system.debug.editorUri'), ['filename' => $frame['file'], 'line' => $frame['line']]) ?>"><span class="error-debug-filename"><?= preg_replace('/([^\/]+)$/', '<strong>$1</strong>', $frame['file']) ?></span><span class="error-debug-line">:<?= $frame['line'] ?></span></a></summary>
<?= Formwork\Debug\CodeDumper::dumpBacktraceFrame($frame, $app->config()->get('system.debug.contextLines', 5)) ?>
<?php Formwork\Debug\CodeDumper::dumpBacktraceFrame($frame, $app->config()->get('system.debug.contextLines', 5)) ?>
</details>
<?php endif ?>
<?php endforeach ?>
4 changes: 2 additions & 2 deletions formwork/views/errors/partials/header.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html lang="en">

<head>
<title><?= $message ?? 'Internal Server Error' ?> | Formwork</title>
<title><?= $this->escape($message ?? 'Internal Server Error') ?> | Formwork</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
Expand Down Expand Up @@ -132,5 +132,5 @@
<div class="container">
<h1>
<span class="error-code"><?= $status ?? 500 ?></span>
<span class="error-status"><?= $message ?? 'Internal Server Error' ?></span>
<span class="error-status"><?= $this->escape($message ?? 'Internal Server Error') ?></span>
</h1>
16 changes: 8 additions & 8 deletions panel/views/errors/error.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html class="color-scheme-<?= $panel->colorScheme()->value ?>">

<head>
<title><?php if (!empty($title)) : ?><?= $title ?> | <?php endif ?>Formwork</title>
<title><?php if (!empty($title)) : ?><?= $this->escape($title) ?> | <?php endif ?>Formwork</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="robots" content="noindex, nofollow">
<link rel="icon" type="image/svg+xml" href="<?= $this->assets()->get('@panel/images/icon.svg')->uri() ?>">
Expand All @@ -17,23 +17,23 @@
<div class="error-container">
<h1>
<span class="error-code"><?= $code ?></span>
<span class="error-status"><?= $status ?></span>
<span class="error-status"><?= $this->escape($status) ?></span>
</h1>
<img class="logo" src="<?= $this->assets()->get('@panel/images/icon.svg')->uri() ?>">
<h2><?= $heading ?></h2>
<p><?= $description ?></p>
<?php if (isset($action)) : ?><a class="action" href="<?= $action['href'] ?>"><?= $action['label'] ?></a><?php endif ?>
<h2><?= $this->escape($heading) ?></h2>
<p><?= $this->escape($description) ?></p>
<?php if (isset($action)) : ?><a class="action" href="<?= $action['href'] ?>"><?= $this->escape($action['label']) ?></a><?php endif ?>
Comment thread
giuscris marked this conversation as resolved.
</div>
</div>
<?php if (isset($throwable, $stackTrace)) : ?>
<div class="container-full">
<div class="error-debug-details">
<h3>Uncaught <code><?= $throwable::class ?></code>: <?= $throwable->getMessage() ?></h3>
<h3>Uncaught <code><?= $throwable::class ?></code>: <?= $this->escape($throwable->getMessage()) ?></h3>
<?php foreach ($stackTrace as $i => $frame) : ?>
<?php if (isset($frame['file'], $frame['line'])): ?>
<details <?= $this->attr(['open' => $i === 0]) ?>>
<summary><a class="error-debug-editor-uri" href="<?= Formwork\Utils\Str::interpolate($app->config()->get('system.debug.editorUri'), ['filename' => $frame['file'], 'line' => $frame['line']]) ?>"><span class="error-debug-filename"><?= preg_replace('/([^\/]+)$/', '<strong>$1</strong>', $frame['file']) ?></span><span class="error-debug-line">:<?= $frame['line'] ?></span></a></summary>
<?= Formwork\Debug\CodeDumper::dumpBacktraceFrame($frame, $app->config()->get('system.debug.contextLines', 5)) ?>
<?php Formwork\Debug\CodeDumper::dumpBacktraceFrame($frame, $app->config()->get('system.debug.contextLines', 5)) ?>
</details>
<?php endif ?>
<?php endforeach ?>
Expand All @@ -45,4 +45,4 @@
<?php $this->insert('@panel._scripts') ?>
</body>

</html>
</html>
2 changes: 1 addition & 1 deletion panel/views/layouts/login.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html lang="<?= $app->translations()->getCurrent()->code() ?>" class="color-scheme-<?= $panel->colorScheme()->value ?>">

<head>
<title><?php if (!empty($title)) : ?><?= $title ?> | <?php endif ?>Formwork</title>
<title><?php if (!empty($title)) : ?><?= $this->escape($title) ?> | <?php endif ?>Formwork</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
<meta name="robots" content="noindex, nofollow">
<link rel="icon" type="image/svg+xml" href="<?= $this->assets()->get('@panel/images/icon.svg')->uri() ?>">
Expand Down
2 changes: 1 addition & 1 deletion panel/views/layouts/panel.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html lang="<?= $app->translations()->getCurrent()->code() ?>" class="color-scheme-<?= $panel->colorScheme()->value ?>">

<head>
<title><?php if (!empty($title)) : ?><?= $title ?> | <?php endif ?>Formwork</title>
<title><?php if (!empty($title)) : ?><?= $this->escape($title) ?> | <?php endif ?>Formwork</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
<meta name="robots" content="noindex, nofollow">
<?php foreach ($panel->notifications() as $notification) : ?>
Expand Down
4 changes: 2 additions & 2 deletions panel/views/tools/updates.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<section id="updater-component" class="section">
<div class="row">
<div class="col-md-1-1">
<div class="checker"><span class="spinner"></span><span class="update-status" data-checking-text="<?= $this->translate('panel.updates.status.checking') ?>" data-installing-text="<?= $this->translate('panel.updates.status.installing') ?>"><?= $this->translate('panel.updates.status.checking') ?></span></div>
<div class="checker"><span class="spinner"></span><span class="update-status" data-checking-text="<?= $this->escapeAttr($this->translate('panel.updates.status.checking')) ?>" data-installing-text="<?= $this->escapeAttr($this->translate('panel.updates.status.installing')) ?>"><?= $this->translate('panel.updates.status.checking') ?></span></div>
Comment thread
giuscris marked this conversation as resolved.
</div>
</div>
<div class="row new-version mt-9" style="display: none;">
Expand All @@ -25,4 +25,4 @@
<p><strong class="current-version-name">Formwork <?= $currentVersion ?></strong> <?= $this->translate('panel.updates.latestVersionAvailable') ?></p>
</div>
</div>
</section>
</section>
2 changes: 1 addition & 1 deletion panel/views/users/profile.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
<div class="h3 mb-0"><?= $this->escape($user->fullname()) ?></div>
<div class="text-color-gray-medium mb-4"><?= $this->escape($user->username()) ?></div>
<div class="mb-2"><a href="mailto:<?= $user->email() ?>"><?= $this->escape($user->email()) ?></a></div>
<div class="text-size-sm mb-2"><strong><?= $this->translate('user.role') ?>:</strong> <?= $user->role()->title() ?></div>
<div class="text-size-sm mb-2"><strong><?= $this->translate('user.role') ?>:</strong> <?= $this->escape($user->role()->title()) ?></div>
<div class="text-size-sm"><strong><?= $this->translate('panel.user.lastAccess') ?>:</strong> <?= is_null($user->lastAccess()) ? '&infin;' : $this->datetime($user->lastAccess()) ?></div>
</div>
</section>
Expand Down
2 changes: 1 addition & 1 deletion site/templates/blog.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<?php foreach ($posts as $post) : ?>
<article class="article">
<?php if ($post->has('coverImage') && ($image = $post->coverImage())) : ?>
<img class="article-cover-image" src="<?= $image->uri() ?>" alt="<?= $this->escape($post->title()) ?>">
<img class="article-cover-image" src="<?= $image->uri() ?>" alt="<?= $this->escapeAttr($post->title()) ?>">
Comment thread
giuscris marked this conversation as resolved.
<?php endif ?>
<?php if (!$post->publishDate()->isEmpty()) : ?><time class="article-time"><?= $post->publishDate()->toTimeDistance() ?></time><?php endif ?>
<h1 class="article-title"><a href="<?= $post->uri() ?>"><?= $this->escape($post->title()) ?></a></h1>
Expand Down
4 changes: 2 additions & 2 deletions site/templates/layouts/site.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html lang="<?= $site->languages()->current() ?>">

<head>
<title><?= $page->title() ?> | <?= $site->title() ?></title>
<title><?= $this->escape($page->title()) ?> | <?= $this->escape($site->title()) ?></title>
<?= $this->insert('_meta') ?>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22><text y=%22.9em%22 font-size=%2290%22>🚧</text></svg>">
Expand All @@ -25,4 +25,4 @@
</footer>
</body>

</html>
</html>
Loading