Template escaping
This commit is contained in:
@@ -33,15 +33,15 @@
|
||||
</section>
|
||||
<section class="column text" style="--columns: 4">
|
||||
<h3>Email</h3>
|
||||
<p><?= html::email($page->email()) ?></p>
|
||||
<p><?= Html::email($page->email()) ?></p>
|
||||
<h3>Phone</h3>
|
||||
<p><?= html::tel($page->phone()) ?></p>
|
||||
<p><?= Html::tel($page->phone()) ?></p>
|
||||
</section>
|
||||
<section class="column text" style="--columns: 4">
|
||||
<h3>On the web</h3>
|
||||
<ul>
|
||||
<?php foreach ($page->social()->toStructure() as $social): ?>
|
||||
<li><?= html::a($social->url(), $social->platform()) ?></li>
|
||||
<li><?= Html::a($social->url(), $social->platform()) ?></li>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
</section>
|
||||
|
@@ -21,7 +21,7 @@
|
||||
<?php snippet('header') ?>
|
||||
|
||||
<article>
|
||||
<h1 class="h1"><?= $page->title()->html() ?></h1>
|
||||
<h1 class="h1"><?= $page->title()->esc() ?></h1>
|
||||
<div class="text">
|
||||
<?= $page->text()->kt() ?>
|
||||
</div>
|
||||
|
@@ -48,7 +48,7 @@
|
||||
<?php endif ?>
|
||||
<figcaption>
|
||||
<span>
|
||||
<span class="example-name"><?= $album->title()->html() ?></span>
|
||||
<span class="example-name"><?= $album->title()->esc() ?></span>
|
||||
</span>
|
||||
</figcaption>
|
||||
</figure>
|
||||
|
@@ -31,9 +31,9 @@
|
||||
|
||||
<article class="note">
|
||||
<header class="note-header h1">
|
||||
<h1 class="note-title"><?= $page->title()->html() ?></h1>
|
||||
<h1 class="note-title"><?= $page->title()->esc() ?></h1>
|
||||
<?php if ($page->subheading()->isNotEmpty()): ?>
|
||||
<p class="note-subheading"><small><?= $page->subheading()->html() ?></small></p>
|
||||
<p class="note-subheading"><small><?= $page->subheading()->esc() ?></small></p>
|
||||
<?php endif ?>
|
||||
</header>
|
||||
<div class="note text">
|
||||
@@ -44,13 +44,13 @@
|
||||
<ul class="note-tags">
|
||||
<?php foreach ($tags as $tag): ?>
|
||||
<li>
|
||||
<a href="<?= $page->parent()->url(['params' => ['tag' => $tag]]) ?>"><?= html($tag) ?></a>
|
||||
<a href="<?= $page->parent()->url(['params' => ['tag' => $tag]]) ?>"><?= esc($tag) ?></a>
|
||||
</li>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
<?php endif ?>
|
||||
|
||||
<time class="note-date" datetime="<?= $page->date('c') ?>">Published on <?= $page->date() ?></time>
|
||||
<time class="note-date" datetime="<?= $page->date()->toDate('c') ?>">Published on <?= $page->date()->esc() ?></time>
|
||||
</footer>
|
||||
|
||||
<?php snippet('prevnext') ?>
|
||||
|
@@ -26,7 +26,7 @@
|
||||
<?php if (empty($tag) === false): ?>
|
||||
<header class="h1">
|
||||
<h1>
|
||||
<small>Tag:</small> <?= html($tag) ?>
|
||||
<small>Tag:</small> <?= esc($tag) ?>
|
||||
<a href="<?= $page->url() ?>" aria-label="All Notes">×</a>
|
||||
</h1>
|
||||
</header>
|
||||
|
@@ -30,7 +30,7 @@
|
||||
<?= ($cover = $project->cover()) ? $cover->crop(400, 500) : null ?>
|
||||
</span>
|
||||
<figcaption class="img-caption">
|
||||
<?= $project->title()->html() ?>
|
||||
<?= $project->title()->esc() ?>
|
||||
</figcaption>
|
||||
</figure>
|
||||
</a>
|
||||
|
Reference in New Issue
Block a user