Skip to content

Commit

Permalink
🐛 Fix: RSS rendering issues caused by XML escape
Browse files Browse the repository at this point in the history
Co-authored-by: Cell <1024@lruihao.cn>
Co-authored-by: Tim <yangzair@outlook.com>
  • Loading branch information
Lruihao and Ryaang committed Oct 24, 2024
1 parent 28759d5 commit c08671d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions layouts/partials/feed/rss.html
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
2 changes: 1 addition & 1 deletion layouts/partials/init/index.html
Original file line number Diff line number Diff line change
@@ -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" . -}}
Expand Down

0 comments on commit c08671d

Please sign in to comment.