Escape page titles in attributes

master
Will Faught 2 years ago
parent da1eace490
commit a8e900e261

@ -130,7 +130,7 @@
{{ if and $content $paramlink }} {{ if and $content $paramlink }}
{{ $link := or (.Param "paige.feed.page_link" | markdownify) "⏎" }} {{ $link := or (.Param "paige.feed.page_link" | markdownify) "⏎" }}
{{ $footer := printf `<p><a href="%s" title="%s">%s</a></p>` .Permalink .Title $link }} {{ $footer := printf `<p><a href="%s" title="%s">%s</a></p>` .Permalink (htmlEscape .Title) $link }}
{{ $content = print $content $footer }} {{ $content = print $content $footer }}
{{ end }} {{ end }}

@ -93,7 +93,7 @@
{{ if and $description $paramlink }} {{ if and $description $paramlink }}
{{ $pagelink := or (.Param "paige.feed.page_link" | markdownify) "⏎" }} {{ $pagelink := or (.Param "paige.feed.page_link" | markdownify) "⏎" }}
{{ $footer := printf `<p><a href="%s" title="%s">%s</a></p>` .Permalink $title $pagelink }} {{ $footer := printf `<p><a href="%s" title="%s">%s</a></p>` .Permalink (htmlEscape $title) $pagelink }}
{{ $description = print $description $footer }} {{ $description = print $description $footer }}
{{ end }} {{ end }}

Loading…
Cancel
Save