Remove unneeded safeHTML

master
Will Faught 2 years ago
parent a09bbcd5cf
commit dc9b075bde

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

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

@ -2,8 +2,8 @@
{{ with $page.Param "paige.alert" }} {{ with $page.Param "paige.alert" }}
{{ if reflect.IsMap . }} {{ if reflect.IsMap . }}
<div class="alert alert-{{ .type }}" role="alert">{{ .message | markdownify | safeHTML }}</div> <div class="alert alert-{{ .type }}" role="alert">{{ .message | markdownify }}</div>
{{ else }} {{ else }}
<div class="alert alert-primary" role="alert">{{ . | markdownify | safeHTML }}</div> <div class="alert alert-primary" role="alert">{{ . | markdownify }}</div>
{{ end }} {{ end }}
{{ end }} {{ end }}

@ -5,7 +5,7 @@
<div class="d-flex justify-content-center"> <div class="d-flex justify-content-center">
<ol class="breadcrumb mb-0"> <ol class="breadcrumb mb-0">
{{ range .Reverse }} {{ range .Reverse }}
<li class="breadcrumb-item"><a href="{{ .RelPermalink }}">{{ .Title | markdownify | safeHTML }}</a></li> <li class="breadcrumb-item"><a href="{{ .RelPermalink }}">{{ .Title | markdownify }}</a></li>
{{ end }} {{ end }}
</ol> </ol>
</div> </div>

@ -5,12 +5,12 @@
{{ $commiturl := "" }} {{ $commiturl := "" }}
{{ $date := $page.PublishDate }} {{ $date := $page.PublishDate }}
{{ $dateformat := $page.Param "paige.date.format" | default ":date_long" }} {{ $dateformat := $page.Param "paige.date.format" | default ":date_long" }}
{{ $description := $page.Description | markdownify | safeHTML }} {{ $description := $page.Description | markdownify }}
{{ $link := $page.Params.link }} {{ $link := $page.Params.link }}
{{ $readingtime := $page.ReadingTime }} {{ $readingtime := $page.ReadingTime }}
{{ $series := $page.Params.series }} {{ $series := $page.Params.series }}
{{ $tags := $page.Params.tags | default slice | uniq }} {{ $tags := $page.Params.tags | default slice | uniq }}
{{ $title := $page.Title | markdownify | safeHTML }} {{ $title := $page.Title | markdownify }}
{{ if and ($page.Param "paige.git.commit_url") $page.GitInfo }} {{ if and ($page.Param "paige.git.commit_url") $page.GitInfo }}
{{ $commiturl = printf ($page.Param "paige.git.commit_url") $page.GitInfo.Hash }} {{ $commiturl = printf ($page.Param "paige.git.commit_url") $page.GitInfo.Hash }}

@ -5,7 +5,7 @@
{{ $commiturl := "" }} {{ $commiturl := "" }}
{{ $date := $page.PublishDate }} {{ $date := $page.PublishDate }}
{{ $dateformat := $page.Param "paige.date.format" | default ":date_long" }} {{ $dateformat := $page.Param "paige.date.format" | default ":date_long" }}
{{ $description := $page.Description | markdownify | safeHTML }} {{ $description := $page.Description | markdownify }}
{{ $draft := $page.Draft }} {{ $draft := $page.Draft }}
{{ $expired := and $page.ExpiryDate (lt $page.ExpiryDate now) }} {{ $expired := and $page.ExpiryDate (lt $page.ExpiryDate now) }}
{{ $flags := slice }} {{ $flags := slice }}
@ -14,9 +14,9 @@
{{ $pinned := $page.Params.paige.pin }} {{ $pinned := $page.Params.paige.pin }}
{{ $readingtime := $page.ReadingTime }} {{ $readingtime := $page.ReadingTime }}
{{ $series := $page.Params.series }} {{ $series := $page.Params.series }}
{{ $summary := $page.Summary | plainify | htmlUnescape | safeHTML }} {{ $summary := $page.Summary | plainify | htmlUnescape }}
{{ $tags := $page.Params.tags | default slice | uniq }} {{ $tags := $page.Params.tags | default slice | uniq }}
{{ $title := $page.Title | markdownify | safeHTML }} {{ $title := $page.Title | markdownify }}
{{ $titlelink := $page.RelPermalink }} {{ $titlelink := $page.RelPermalink }}
{{ if and (.Param "paige.git.commit_url") .GitInfo }} {{ if and (.Param "paige.git.commit_url") .GitInfo }}

@ -1,8 +1,8 @@
{{ $page := . }} {{ $page := . }}
{{ $pagetitle := $page.Title | markdownify | plainify | htmlUnescape | safeHTML }} {{ $pagetitle := $page.Title | markdownify | plainify | htmlUnescape }}
{{ $result := "" }} {{ $result := "" }}
{{ $sitetitle := site.Title | markdownify | plainify | htmlUnescape | safeHTML }} {{ $sitetitle := site.Title | markdownify | plainify | htmlUnescape }}
{{ if and $pagetitle $sitetitle }} {{ if and $pagetitle $sitetitle }}
{{ if .IsHome }} {{ if .IsHome }}

@ -1,5 +1,5 @@
{{ $caption := .Get 0 | default (.Get "caption") | markdownify | safeHTML }} {{ $caption := .Get 0 | default (.Get "caption") | markdownify }}
{{ $content := .Inner | markdownify | safeHTML }} {{ $content := .Inner | markdownify }}
{{ $float := .Get "float" }} {{ $float := .Get "float" }}
{{ $horizontal := .Get "horizontal" | default "center" }} {{ $horizontal := .Get "horizontal" | default "center" }}
{{ $maxwidth := .Get "maxwidth" }} {{ $maxwidth := .Get "maxwidth" }}

@ -1,5 +1,5 @@
{{ $cite := .Get 0 | default (.Get "cite") }} {{ $cite := .Get 0 | default (.Get "cite") }}
{{ $content := .Inner | replaceRE "^\n" "" | replaceRE "\n$" "" | markdownify | safeHTML }} {{ $content := .Inner | replaceRE "^\n" "" | replaceRE "\n$" "" | markdownify }}
{{ if not $content }} {{ if not $content }}
{{ errorf "layouts/shortcodes/paige/quote.html: no content" }} {{ errorf "layouts/shortcodes/paige/quote.html: no content" }}

Loading…
Cancel
Save