🐛 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:
Cell
2024-10-24 15:27:39 +08:00
parent 28759d5020
commit c08671dedf
2 changed files with 2 additions and 4 deletions
+1 -3
View File
@@ -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 -1
View File
@@ -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" . -}}