rss: strip potentially-unsafe style elements

This commit is contained in:
John Bowdre 2024-01-15 14:53:35 -06:00
parent 1070fc31a9
commit c74cc3ad37

View file

@ -44,6 +44,7 @@
{{- $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 -}}
{{- $content = replaceRE `-moz-tab-size:\d;-o-tab-size:\d;tab-size:\d` "" $content -}}
<description>{{ $content | html }}</description>
</item>
{{ end }}