rss: encode content in description

This commit is contained in:
John Bowdre 2024-01-15 13:09:20 -06:00
parent f98628bfce
commit 7497882d94

View file

@ -13,6 +13,7 @@
{{- printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>" | safeHTML }}
<rss version="2.0"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
<title>{{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{.}} on {{ end }}{{ .Site.Title }}{{ end }}</title>
@ -40,7 +41,8 @@
{{ range (.GetTerms "tags") }}
<category>{{ .LinkTitle }}</category>{{ end }}
<guid>{{ .Permalink }}</guid>
<description>{{- .Content | html -}}</description>
<description>{{ "<![CDATA[" | safeHTML }} {{ .Summary }}]]></description>
<content:encoded>{{ "<![CDATA[" | safeHTML }} {{ .Content }}]]></content:encoded>
</item>
{{ end }}
</channel>