enforce xml escaping for content

This commit is contained in:
Wonderfall 2023-12-31 20:29:46 +01:00
parent 73484a80d7
commit 71871d277c

View File

@ -69,7 +69,7 @@
<updated>{{ .Lastmod.Format "2006-01-02T15:04:05Z07:00" | safeHTML }}</updated> <updated>{{ .Lastmod.Format "2006-01-02T15:04:05Z07:00" | safeHTML }}</updated>
<summary type="html">{{ with .Description | html }}{{ . }}{{ else }}{{ .Summary | html }}{{ end -}}</summary> <summary type="html">{{ with .Description | html }}{{ . }}{{ else }}{{ .Summary | html }}{{ end -}}</summary>
{{- if site.Params.ShowFullTextinRSS }} {{- if site.Params.ShowFullTextinRSS }}
<content type="html">{{ .Content | html }}</content> <content type="html">{{ (printf "<![CDATA[%s]]>" .Content) | safeHTML }}</content>
{{- end }} {{- end }}
</entry> </entry>
{{- end }} {{- end }}