Escape page link in feeds

master
Will Faught 4 months ago
parent 2c67954798
commit d2cf01a1a9

@ -108,7 +108,7 @@
{{ $published := $subpage.PublishDate.Format $date }}
{{ $title := markdownify $subpage.Title }}
{{ $link := cond $external $subpage.Params.link $subpage.Permalink }}
{{ $link := cond $external (htmlEscape $subpage.Params.link) $subpage.Permalink }}
{{ if and $content $external }}
{{ $text := or ($subpage.Param "paige.feeds.page_link" | markdownify) "⏎" }}
@ -157,7 +157,7 @@
{{ $href := cond (and (eq $rel "alternate") (eq .MediaType.Type "text/html")) $link .Permalink }}
<link href="{{ htmlEscape $href }}" hreflang="{{ $subpage.Language.LanguageCode }}" rel="{{ $rel }}" type="{{ .MediaType }}"/>
<link href="{{ $href }}" hreflang="{{ $subpage.Language.LanguageCode }}" rel="{{ $rel }}" type="{{ .MediaType }}"/>
{{ end }}
{{ range $t := $subpage.Translations }}

@ -95,7 +95,7 @@
{{ $published := $subpage.PublishDate.Format $date }}
{{ $title := $subpage.Title | markdownify | plainify | htmlUnescape }}
{{ $link := cond $external $subpage.Params.link $subpage.Permalink }}
{{ $link := cond $external (htmlEscape $subpage.Params.link) $subpage.Permalink }}
{{ with $authors }}
{{ $primary := index . 0 }}
@ -144,7 +144,7 @@
{{ $href := cond (and (eq $rel "alternate") (eq .MediaType.Type "text/html")) $link .Permalink }}
<atom:link href="{{ htmlEscape $href }}" hreflang="{{ $subpage.Language.LanguageCode }}" rel="{{ $rel }}" type="{{ .MediaType }}"/>
<atom:link href="{{ $href }}" hreflang="{{ $subpage.Language.LanguageCode }}" rel="{{ $rel }}" type="{{ .MediaType }}"/>
{{ end }}
{{ range $t := $subpage.Translations }}

Loading…
Cancel
Save