Add missing uses of safeHTML

This commit is contained in:
Will Faught
2023-09-15 23:44:56 -07:00
parent f410b73b24
commit 173872ea26
11 changed files with 20 additions and 20 deletions

View File

@@ -5,11 +5,11 @@
{{- $page.Scratch.Add "paige_index" (dict
"categories" .Params.categories
"date" .PublishDate
"description" (.Description | markdownify | plainify | htmlUnescape)
"description" (.Description | markdownify | plainify | htmlUnescape | safeHTML)
"keywords" .Params.keywords
"link" .RelPermalink
"tags" .Params.tags
"text" (strings.TrimRight " " (replace (.Plain | htmlUnescape) "\n" " "))
"title" (.Title | markdownify | plainify | htmlUnescape)) -}}
"text" (strings.TrimRight " " (replace (.Plain | htmlUnescape | safeHTML) "\n" " "))
"title" (.Title | markdownify | plainify | htmlUnescape | safeHTML)) -}}
{{- end -}}
{{- $page.Scratch.Get "paige_index" | jsonify -}}

View File

@@ -8,7 +8,7 @@
<ul class="list-inline text-center">
{{ range (sort . "Title") }}
<li class="list-inline-item">
<a href="{{ .RelPermalink }}">{{ .Title | markdownify }}</a>
<a href="{{ .RelPermalink }}">{{ .Title | markdownify | safeHTML }}</a>
</li>
{{ end }}
</ul>

View File

@@ -50,7 +50,7 @@
{{ if .Content }}
<description>{{ printf "<![CDATA[%s]]>" .Content | safeHTML }}</description>
{{ else if .Description }}
<description>{{ .Description | markdownify | html }}</description>
<description>{{ .Description | markdownify | safeHTML }}</description>
{{ end }}
{{ with .Permalink }}
<guid>{{ . }}</guid>
@@ -60,7 +60,7 @@
<pubDate>{{ .Format "Mon, 02 Jan 2006 15:04:05 -0700" }}</pubDate>
{{ end }}
{{ with .Title }}
<title>{{ . | markdownify | plainify | htmlUnescape }}</title>
<title>{{ . | markdownify | plainify | htmlUnescape | safeHTML }}</title>
{{ end }}
</item>
{{ end }}