Mark includes as safe

master
Will Faught 4 months ago
parent 1b0ca92c5a
commit fad409c0bd

@ -14,21 +14,21 @@
{{ partial "paige/head.html" $page }} {{ partial "paige/head.html" $page }}
{{ partial "paige/body.html" $page }} {{ partial "paige/body.html" $page }}
{{ partial "paige/func-include.html" (dict "name" "body-first%s.html" "page" $page) }} {{ partial "paige/func-include.html" (dict "name" "body-first%s.html" "page" $page) | safeHTML }}
<div class="container"> <div class="container">
<div class="row"> <div class="row">
<div class="col mt-3" id="paige-site" {{ with $attrs }} {{ $attrs | safeHTMLAttr }} {{ end }}> <div class="col mt-3" id="paige-site" {{ with $attrs }} {{ $attrs | safeHTMLAttr }} {{ end }}>
{{ partial "paige/func-include.html" (dict "name" "site-first%s.html" "page" $page) }} {{ partial "paige/func-include.html" (dict "name" "site-first%s.html" "page" $page) | safeHTML }}
{{ partial "paige/site-header.html" $page }} {{ partial "paige/site-header.html" $page }}
{{ block "main" $page }}{{ end }} {{ block "main" $page }}{{ end }}
{{ partial "paige/site-footer.html" $page }} {{ partial "paige/site-footer.html" $page }}
{{ partial "paige/func-include.html" (dict "name" "site-last%s.html" "page" $page) }} {{ partial "paige/func-include.html" (dict "name" "site-last%s.html" "page" $page) | safeHTML }}
</div> </div>
</div> </div>
</div> </div>
{{ partial "paige/scripts.html" $page }} {{ partial "paige/scripts.html" $page }}
{{ partial "paige/func-include.html" (dict "name" "body-last%s.html" "page" $page) }} {{ partial "paige/func-include.html" (dict "name" "body-last%s.html" "page" $page) | safeHTML }}
</body> </body>
</html> </html>

@ -33,7 +33,7 @@
{{ $title := delimit $titles " · " }} {{ $title := delimit $titles " · " }}
<head> <head>
{{ partial "paige/func-include.html" (dict "name" "head-first%s.html" "page" $page) }} {{ partial "paige/func-include.html" (dict "name" "head-first%s.html" "page" $page) | safeHTML }}
{{ partial "paige/metas.html" $page }} {{ partial "paige/metas.html" $page }}
{{ with $title }} {{ with $title }}
@ -42,5 +42,5 @@
{{ partial "paige/links.html" $page }} {{ partial "paige/links.html" $page }}
{{ partial "paige/style.html" $page }} {{ partial "paige/style.html" $page }}
{{ partial "paige/func-include.html" (dict "name" "head-last%s.html" "page" $page) }} {{ partial "paige/func-include.html" (dict "name" "head-last%s.html" "page" $page) | safeHTML }}
</head> </head>

@ -19,7 +19,7 @@
{{ if or $edit $history $first $last $next $prev }} {{ if or $edit $history $first $last $next $prev }}
<footer class="mw-100" id="paige-page-footer"> <footer class="mw-100" id="paige-page-footer">
{{ partial "paige/func-include.html" (dict "name" "page-footer-first%s.html" "page" $page) }} {{ partial "paige/func-include.html" (dict "name" "page-footer-first%s.html" "page" $page) | safeHTML }}
{{ if or $edit $history }} {{ if or $edit $history }}
<div id="paige-page-file"> <div id="paige-page-file">
@ -49,6 +49,6 @@
</div> </div>
{{ end }} {{ end }}
{{ partial "paige/func-include.html" (dict "name" "page-footer-last%s.html" "page" $page) }} {{ partial "paige/func-include.html" (dict "name" "page-footer-last%s.html" "page" $page) | safeHTML }}
</footer> </footer>
{{ end }} {{ end }}

@ -23,7 +23,7 @@
{{ if or $alert $authors $date $description $first $keywords $last $time $series $title $toc $words }} {{ if or $alert $authors $date $description $first $keywords $last $time $series $title $toc $words }}
<header class="mw-100" id="paige-page-header"> <header class="mw-100" id="paige-page-header">
<div class="align-items-center d-flex flex-column"> <div class="align-items-center d-flex flex-column">
{{ partial "paige/func-include.html" (dict "name" "page-header-first%s.html" "page" $page) }} {{ partial "paige/func-include.html" (dict "name" "page-header-first%s.html" "page" $page) | safeHTML }}
{{ with $title }} {{ with $title }}
<h1 class="fw-bold" id="paige-page-title" {{ if $microdata }} itemprop="headline name" {{ end }}>{{ if $link }}<a href="{{ $link }}">{{ . }}</a>{{ else }}{{ . }}{{ end }}</h1> <h1 class="fw-bold" id="paige-page-title" {{ if $microdata }} itemprop="headline name" {{ end }}>{{ if $link }}<a href="{{ $link }}">{{ . }}</a>{{ else }}{{ . }}{{ end }}</h1>
@ -123,7 +123,7 @@
</div> </div>
{{ end }} {{ end }}
{{ partial "paige/func-include.html" (dict "name" "page-header-last%s.html" "page" $page) }} {{ partial "paige/func-include.html" (dict "name" "page-header-last%s.html" "page" $page) | safeHTML }}
</div> </div>
</header> </header>
{{ end }} {{ end }}

@ -46,17 +46,17 @@
{{ $class = delimit ($class | uniq | sort) " " }} {{ $class = delimit ($class | uniq | sort) " " }}
<article class="{{ if $min }} align-items-center d-flex flex-column {{ end }} {{ $class }}" id="paige-page"> <article class="{{ if $min }} align-items-center d-flex flex-column {{ end }} {{ $class }}" id="paige-page">
{{ partial "paige/func-include.html" (dict "name" "page-first%s.html" "page" $page) }} {{ partial "paige/func-include.html" (dict "name" "page-first%s.html" "page" $page) | safeHTML }}
{{ partial "paige/page-header.html" $page }} {{ partial "paige/page-header.html" $page }}
{{ with $content }} {{ with $content }}
<main class="mw-100" id="paige-page-content" {{ if $microdata }} itemprop="articleBody" {{ end }}> <main class="mw-100" id="paige-page-content" {{ if $microdata }} itemprop="articleBody" {{ end }}>
{{ partial "paige/func-include.html" (dict "name" "page-body-first%s.html" "page" $page) }} {{ partial "paige/func-include.html" (dict "name" "page-body-first%s.html" "page" $page) | safeHTML }}
{{ . | safeHTML }} {{ . | safeHTML }}
{{ partial "paige/func-include.html" (dict "name" "page-body-last%s.html" "page" $page) }} {{ partial "paige/func-include.html" (dict "name" "page-body-last%s.html" "page" $page) | safeHTML }}
</main> </main>
{{ end }} {{ end }}
{{ partial "paige/page-footer.html" $page }} {{ partial "paige/page-footer.html" $page }}
{{ partial "paige/func-include.html" (dict "name" "page-last%s.html" "page" $page) }} {{ partial "paige/func-include.html" (dict "name" "page-last%s.html" "page" $page) | safeHTML }}
</article> </article>

@ -17,7 +17,7 @@
{{ if or $copyright $credit $first $last $license }} {{ if or $copyright $credit $first $last $license }}
<footer id="paige-site-footer"> <footer id="paige-site-footer">
{{ partial "paige/func-include.html" (dict "name" "site-footer-first%s.html" "page" $page) }} {{ partial "paige/func-include.html" (dict "name" "site-footer-first%s.html" "page" $page) | safeHTML }}
{{ with $copyright }} {{ with $copyright }}
<p class="paige-row-short text-center text-secondary" id="paige-site-copyright" {{ if $microdata }} itemprop="copyrightNotice" {{ end }}>{{ . }}</p> <p class="paige-row-short text-center text-secondary" id="paige-site-copyright" {{ if $microdata }} itemprop="copyrightNotice" {{ end }}>{{ . }}</p>
@ -31,6 +31,6 @@
<p class="paige-row-short text-center text-secondary" id="paige-site-credit">{{ . }}</p> <p class="paige-row-short text-center text-secondary" id="paige-site-credit">{{ . }}</p>
{{ end }} {{ end }}
{{ partial "paige/func-include.html" (dict "name" "site-footer-last%s.html" "page" $page) }} {{ partial "paige/func-include.html" (dict "name" "site-footer-last%s.html" "page" $page) | safeHTML }}
</footer> </footer>
{{ end }} {{ end }}

@ -35,7 +35,7 @@
{{ if or $breadcrumbs $description $first $last $menu $title }} {{ if or $breadcrumbs $description $first $last $menu $title }}
<header id="paige-site-header"> <header id="paige-site-header">
{{ partial "paige/func-include.html" (dict "name" "site-header-first%s.html" "page" $page) }} {{ partial "paige/func-include.html" (dict "name" "site-header-first%s.html" "page" $page) | safeHTML }}
{{ with $title }} {{ with $title }}
<div class="display-1 fw-bold {{ if not (or $breadcrumbs $description $menu) }} paige-row-tall {{ end }} text-center" id="paige-site-title"> <div class="display-1 fw-bold {{ if not (or $breadcrumbs $description $menu) }} paige-row-tall {{ end }} text-center" id="paige-site-title">
@ -153,6 +153,6 @@
</nav> </nav>
{{ end }} {{ end }}
{{ partial "paige/func-include.html" (dict "name" "site-header-last%s.html" "page" $page) }} {{ partial "paige/func-include.html" (dict "name" "site-header-last%s.html" "page" $page) | safeHTML }}
</header> </header>
{{ end }} {{ end }}

@ -1,7 +1,7 @@
{{ $page := . }} {{ $page := . }}
<style> <style>
{{ partial "paige/func-include.html" (dict "name" "style-first%s.css" "page" $page) }} {{ partial "paige/func-include.html" (dict "name" "style-first%s.css" "page" $page) | safeCSS }}
.paige-shortcode-figure-numbered { .paige-shortcode-figure-numbered {
counter-increment: paige-shortcode-figure-numbered; counter-increment: paige-shortcode-figure-numbered;
@ -111,5 +111,5 @@ table {
{{ . | safeCSS }} {{ . | safeCSS }}
{{ end }} {{ end }}
{{ partial "paige/func-include.html" (dict "name" "style-last%s.css" "page" $page) }} {{ partial "paige/func-include.html" (dict "name" "style-last%s.css" "page" $page) | safeCSS }}
</style> </style>

Loading…
Cancel
Save