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

This commit is contained in:
John Bowdre 2024-01-15 14:33:26 -06:00
parent 3e7c2ddbe8
commit 35b2791dce

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 }}