From dc9b075bdee82a6a50c3788f3e64cbb5afcf1214 Mon Sep 17 00:00:00 2001 From: Will Faught Date: Sun, 24 Sep 2023 20:58:11 -0700 Subject: [PATCH] Remove unneeded safeHTML --- layouts/_default/home.json | 6 +++--- layouts/_default/paige/cloud.html | 2 +- layouts/partials/paige/alert.html | 4 ++-- layouts/partials/paige/breadcrumbs.html | 2 +- layouts/partials/paige/metadata.html | 4 ++-- layouts/partials/paige/page.html | 6 +++--- layouts/partials/paige/title.html | 4 ++-- layouts/shortcodes/paige/figure.html | 4 ++-- layouts/shortcodes/paige/quote.html | 2 +- 9 files changed, 17 insertions(+), 17 deletions(-) diff --git a/layouts/_default/home.json b/layouts/_default/home.json index a2f52680..8fcbca04 100644 --- a/layouts/_default/home.json +++ b/layouts/_default/home.json @@ -5,11 +5,11 @@ {{- $page.Scratch.Add "paige_index" (dict "categories" .Params.categories "date" .PublishDate - "description" (.Description | markdownify | plainify | htmlUnescape | safeHTML) + "description" (.Description | markdownify | plainify | htmlUnescape) "keywords" .Params.keywords "link" .RelPermalink "tags" .Params.tags - "text" (strings.TrimRight " " (replace (.Plain | htmlUnescape | safeHTML) "\n" " ")) - "title" (.Title | markdownify | plainify | htmlUnescape | safeHTML)) -}} + "text" (strings.TrimRight " " (replace (.Plain | htmlUnescape) "\n" " ")) + "title" (.Title | markdownify | plainify | htmlUnescape)) -}} {{- end -}} {{- $page.Scratch.Get "paige_index" | jsonify -}} diff --git a/layouts/_default/paige/cloud.html b/layouts/_default/paige/cloud.html index c73f726c..f7ee027c 100644 --- a/layouts/_default/paige/cloud.html +++ b/layouts/_default/paige/cloud.html @@ -8,7 +8,7 @@ diff --git a/layouts/partials/paige/alert.html b/layouts/partials/paige/alert.html index 4ed745e8..76254397 100644 --- a/layouts/partials/paige/alert.html +++ b/layouts/partials/paige/alert.html @@ -2,8 +2,8 @@ {{ with $page.Param "paige.alert" }} {{ if reflect.IsMap . }} - + {{ else }} - + {{ end }} {{ end }} diff --git a/layouts/partials/paige/breadcrumbs.html b/layouts/partials/paige/breadcrumbs.html index 2266a8a7..e9b5eade 100644 --- a/layouts/partials/paige/breadcrumbs.html +++ b/layouts/partials/paige/breadcrumbs.html @@ -5,7 +5,7 @@
diff --git a/layouts/partials/paige/metadata.html b/layouts/partials/paige/metadata.html index 3bf1c20e..db0a5992 100644 --- a/layouts/partials/paige/metadata.html +++ b/layouts/partials/paige/metadata.html @@ -5,12 +5,12 @@ {{ $commiturl := "" }} {{ $date := $page.PublishDate }} {{ $dateformat := $page.Param "paige.date.format" | default ":date_long" }} -{{ $description := $page.Description | markdownify | safeHTML }} +{{ $description := $page.Description | markdownify }} {{ $link := $page.Params.link }} {{ $readingtime := $page.ReadingTime }} {{ $series := $page.Params.series }} {{ $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 }} {{ $commiturl = printf ($page.Param "paige.git.commit_url") $page.GitInfo.Hash }} diff --git a/layouts/partials/paige/page.html b/layouts/partials/paige/page.html index bf65babd..9aee6e20 100644 --- a/layouts/partials/paige/page.html +++ b/layouts/partials/paige/page.html @@ -5,7 +5,7 @@ {{ $commiturl := "" }} {{ $date := $page.PublishDate }} {{ $dateformat := $page.Param "paige.date.format" | default ":date_long" }} -{{ $description := $page.Description | markdownify | safeHTML }} +{{ $description := $page.Description | markdownify }} {{ $draft := $page.Draft }} {{ $expired := and $page.ExpiryDate (lt $page.ExpiryDate now) }} {{ $flags := slice }} @@ -14,9 +14,9 @@ {{ $pinned := $page.Params.paige.pin }} {{ $readingtime := $page.ReadingTime }} {{ $series := $page.Params.series }} -{{ $summary := $page.Summary | plainify | htmlUnescape | safeHTML }} +{{ $summary := $page.Summary | plainify | htmlUnescape }} {{ $tags := $page.Params.tags | default slice | uniq }} -{{ $title := $page.Title | markdownify | safeHTML }} +{{ $title := $page.Title | markdownify }} {{ $titlelink := $page.RelPermalink }} {{ if and (.Param "paige.git.commit_url") .GitInfo }} diff --git a/layouts/partials/paige/title.html b/layouts/partials/paige/title.html index b3fe2ed5..ef44bbf8 100644 --- a/layouts/partials/paige/title.html +++ b/layouts/partials/paige/title.html @@ -1,8 +1,8 @@ {{ $page := . }} -{{ $pagetitle := $page.Title | markdownify | plainify | htmlUnescape | safeHTML }} +{{ $pagetitle := $page.Title | markdownify | plainify | htmlUnescape }} {{ $result := "" }} -{{ $sitetitle := site.Title | markdownify | plainify | htmlUnescape | safeHTML }} +{{ $sitetitle := site.Title | markdownify | plainify | htmlUnescape }} {{ if and $pagetitle $sitetitle }} {{ if .IsHome }} diff --git a/layouts/shortcodes/paige/figure.html b/layouts/shortcodes/paige/figure.html index 48e26ef5..f1c1d299 100644 --- a/layouts/shortcodes/paige/figure.html +++ b/layouts/shortcodes/paige/figure.html @@ -1,5 +1,5 @@ -{{ $caption := .Get 0 | default (.Get "caption") | markdownify | safeHTML }} -{{ $content := .Inner | markdownify | safeHTML }} +{{ $caption := .Get 0 | default (.Get "caption") | markdownify }} +{{ $content := .Inner | markdownify }} {{ $float := .Get "float" }} {{ $horizontal := .Get "horizontal" | default "center" }} {{ $maxwidth := .Get "maxwidth" }} diff --git a/layouts/shortcodes/paige/quote.html b/layouts/shortcodes/paige/quote.html index edb3ac9a..525fd1c9 100644 --- a/layouts/shortcodes/paige/quote.html +++ b/layouts/shortcodes/paige/quote.html @@ -1,5 +1,5 @@ {{ $cite := .Get 0 | default (.Get "cite") }} -{{ $content := .Inner | replaceRE "^\n" "" | replaceRE "\n$" "" | markdownify | safeHTML }} +{{ $content := .Inner | replaceRE "^\n" "" | replaceRE "\n$" "" | markdownify }} {{ if not $content }} {{ errorf "layouts/shortcodes/paige/quote.html: no content" }}