tpl/transform: Add transform.XMLEscape template function

Fixes #3268
This commit is contained in:
Joe Mooring
2023-11-24 15:51:27 -08:00
committed by Bjørn Erik Pedersen
parent ef12d169c8
commit b4c5df42ff
6 changed files with 105 additions and 2 deletions

View File

@@ -64,7 +64,7 @@
<pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate>
{{- with $authorEmail }}<author>{{ . }}{{ with $authorName }} ({{ . }}){{ end }}</author>{{ end }}
<guid>{{ .Permalink }}</guid>
<description>{{ .Summary | html }}</description>
<description>{{ .Summary | transform.XMLEscape | safeHTML }}</description>
</item>
{{- end }}
</channel>