Add missing uses of safeURL

master
Will Faught 2 years ago
parent 2924701874
commit 7eb2dbbf35

@ -3,4 +3,4 @@
{{ $href := .href }}
{{ $style := .style }}
<a {{ with $class }} class="{{ . }}" {{ end }} {{ with $href }} href="{{ . }}" {{ end }} {{ with $style }} style="{{ . | safeCSS }}" {{ end }}>{{ $content }}</a>
<a {{ with $class }} class="{{ . }}" {{ end }} {{ with $href }} href="{{ . | safeURL }}" {{ end }} {{ with $style }} style="{{ . | safeCSS }}" {{ end }}>{{ $content }}</a>

@ -16,4 +16,4 @@
{{ $integrity = $resource.Data.Integrity }}
{{ end }}
<link {{ with $crossorigin }} crossorigin="{{ . }}" {{ end }} href="{{ $href }}" integrity="{{ $integrity }}" {{ with $referrerpolicy }} referrerpolicy="{{ . }}" {{ end }} rel="stylesheet">
<link {{ with $crossorigin }} crossorigin="{{ . }}" {{ end }} href="{{ $href | safeURL }}" integrity="{{ $integrity }}" {{ with $referrerpolicy }} referrerpolicy="{{ . }}" {{ end }} rel="stylesheet">

@ -1,13 +1,13 @@
<link href="{{ relLangURL `apple-touch-icon.png` }}" rel="apple-touch-icon" sizes="180x180">
<link href="{{ relLangURL `favicon-16x16.png` }}" rel="icon" sizes="16x16" type="image/png">
<link href="{{ relLangURL `favicon-32x32.png` }}" rel="icon" sizes="32x32" type="image/png">
<link href="{{ relLangURL `apple-touch-icon.png` | safeURL }}" rel="apple-touch-icon" sizes="180x180">
<link href="{{ relLangURL `favicon-16x16.png` | safeURL }}" rel="icon" sizes="16x16" type="image/png">
<link href="{{ relLangURL `favicon-32x32.png` | safeURL }}" rel="icon" sizes="32x32" type="image/png">
{{ if ne (relLangURL "favicon.ico") "/favicon.ico" }}
<link href="{{ relLangURL `favicon.ico` }}" rel="shortcut icon">
<link href="{{ relLangURL `favicon.ico` | safeURL }}" rel="shortcut icon">
{{ end }}
<link href="{{ relLangURL `favicon.png` }}" rel="icon" type="image/png">
<link href="{{ relLangURL `favicon.svg` }}" rel="icon" type="image/svg+xml">
<link color="{{ .Site.Params.paige.color | default `#0d6efd` }}" href="{{ relLangURL `safari-pinned-tab.svg` }}" rel="mask-icon">
<link href="{{ relLangURL `site.webmanifest` }}" rel="manifest">
<link href="{{ relLangURL `favicon.png` | safeURL }}" rel="icon" type="image/png">
<link href="{{ relLangURL `favicon.svg` | safeURL }}" rel="icon" type="image/svg+xml">
<link color="{{ .Site.Params.paige.color | default `#0d6efd` }}" href="{{ relLangURL `safari-pinned-tab.svg` | safeURL }}" rel="mask-icon">
<link href="{{ relLangURL `site.webmanifest` | safeURL }}" rel="manifest">
{{ partial "paige/link.html" (dict
"href" (.Site.Params.paige.bootstrap.icons.link_href | default "https://cdn.jsdelivr.net/npm/bootstrap-icons@1.10.3/font/bootstrap-icons.css")
"integrity" .Site.Params.paige.bootstrap.icons.link_integrity
@ -28,6 +28,6 @@
{{ if .AlternativeOutputFormats }}
{{ $title := partial "paige/func-title.html" . }}
{{ range .AlternativeOutputFormats }}
<link href="{{ .Permalink }}" rel="{{ .Rel }}" title="{{ $title }}" type="{{ .MediaType.Type }}">
<link href="{{ .Permalink | safeURL }}" rel="{{ .Rel }}" title="{{ $title }}" type="{{ .MediaType.Type }}">
{{ end }}
{{ end }}

@ -24,6 +24,6 @@
{{ $pagePath := strings.TrimPrefix $basepath $.RelPermalink }}
{{ $menuPath := strings.TrimPrefix $basepath .URL }}
{{ $active := or (and (eq $menuPath `/`) (eq $pagePath `/`)) (and (ne $menuPath `/`) (hasPrefix $pagePath $menuPath)) }}
<a {{ if $active }} aria-current="page" {{ end }} class="{{ if $active }} active {{ if $links }} link-secondary {{ end }} {{ end }} nav-link" href="{{ .URL }}">{{ .Name }}</a>
<a {{ if $active }} aria-current="page" {{ end }} class="{{ if $active }} active {{ if $links }} link-secondary {{ end }} {{ end }} nav-link" href="{{ .URL | safeURL }}">{{ .Name }}</a>
{{ end }}
</nav>

@ -18,4 +18,4 @@
{{ $src = $resource.RelPermalink }}
{{ end }}
<script {{ with $crossorigin }} crossorigin="{{ . }}" {{ end }} {{ with $defer }} defer {{ end }} integrity="{{ $integrity }}" {{ with $onload }} onload="{{ . }}" {{ end }} {{ with $referrerpolicy }} referrerpolicy="{{ . }}" {{ end }} src="{{ $src }}"></script>
<script {{ with $crossorigin }} crossorigin="{{ . }}" {{ end }} {{ with $defer }} defer {{ end }} integrity="{{ $integrity }}" {{ with $onload }} onload="{{ . }}" {{ end }} {{ with $referrerpolicy }} referrerpolicy="{{ . }}" {{ end }} src="{{ $src | safeURL }}"></script>

Loading…
Cancel
Save