rss: strip <svg>...</svg> elements

This commit is contained in:
John Bowdre 2024-01-15 14:33:26 -06:00
parent f51fc36b6d
commit 4286612406

View file

@ -43,6 +43,7 @@
<guid>{{ .Permalink }}</guid>
{{- $content := replaceRE "a href=\"(#.*?)\"" (printf "%s%s%s" "a href=\"" .Permalink "$1\"") .Content -}}
{{- $content = replaceRE "img src=\"(.*?)\"" (printf "%s%s%s" "img src=\"" .Permalink "$1\"") $content -}}
{{- $content = replaceRE "<svg.*</svg>" "" $content -}}
<description>{{ $content | html }}</description>
</item>
{{ end }}