mirror of
https://github.com/hugo-fixit/FixIt.git
synced 2026-08-24 15:28:57 +00:00
🐛 Fix: RSS rendering issues caused by XML escape
Co-authored-by: Cell <1024@lruihao.cn> Co-authored-by: Tim <yangzair@outlook.com>
This commit is contained in:
@@ -59,14 +59,12 @@
|
||||
{{- end }}
|
||||
{{- if $fullText }}
|
||||
<description>
|
||||
{{- "<![CDATA[" | safeHTML }}
|
||||
{{- $content := dict "Content" .Content "Ruby" $params.ruby "Fraction" $params.fraction "Fontawesome" $params.fontawesome | partial "function/content.html" }}
|
||||
{{- /* {{- $content | replaceRE `<figure[^>]*>.*</figure>` "" | replaceRE `<img[^>]*( /)?>` "" | safeHTML -}} */ -}}
|
||||
{{- with $image }}
|
||||
{{- $content = add (printf "<img src=%q alt=%q referrerpolicy=%q>" . "featured image" "no-referrer") $content | safeHTML }}
|
||||
{{- end }}
|
||||
{{- $content | transform.XMLEscape | safeHTML }}
|
||||
{{- "]]>" | safeHTML -}}
|
||||
{{- $content | transform.XMLEscape | safeHTML -}}
|
||||
</description>
|
||||
{{- else }}
|
||||
<description>{{ (.Summary | default .Description | default .Title) | transform.XMLEscape | safeHTML }}</description>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{{- .Scratch.Set "version" "v0.3.14-0c0fb03a" -}}
|
||||
{{- .Scratch.Set "version" "v0.3.14-28759d50" -}}
|
||||
{{- .Scratch.Set "this" dict -}}
|
||||
|
||||
{{- partial "init/detection-env.html" . -}}
|
||||
|
||||
Reference in New Issue
Block a user