mirror of
https://github.com/jbowdre/runtimeterror.git
synced 2024-11-26 17:02:17 +00:00
rss: strip potentially-unsafe style elements (improve regex)
This commit is contained in:
parent
340e1f0cce
commit
f3570754cb
1 changed files with 1 additions and 1 deletions
|
@ -44,7 +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 -}}
|
||||
{{- $content = replaceRE `-moz-tab-size:\d;-o-tab-size:\d;tab-size:\d;?` "" $content -}}
|
||||
<description>{{ $content | html }}</description>
|
||||
</item>
|
||||
{{ end }}
|
||||
|
|
Loading…
Reference in a new issue