Skip to content

Commit

Permalink
Fix copyright field rendering HTML in RSS feed (#1479)
Browse files Browse the repository at this point in the history
The copyright is rendered in footer as `{{ site.Copyright | markdownify }}`
which assumes it to be Markdown text, but RSS feed template doesn't ready
for Markdown now.
  • Loading branch information
KonishchevDmitry authored Apr 13, 2024
1 parent 8577a8c commit beb281a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion layouts/_default/rss.xml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
<language>{{ site.Language.LanguageCode }}</language>{{ with $authorEmail }}
<managingEditor>{{.}}{{ with $authorName }} ({{ . }}){{ end }}</managingEditor>{{ end }}{{ with $authorEmail }}
<webMaster>{{ . }}{{ with $authorName }} ({{ . }}){{ end }}</webMaster>{{ end }}{{ with site.Copyright }}
<copyright>{{ . }}</copyright>{{ end }}{{ if not .Date.IsZero }}
<copyright>{{ . | markdownify | plainify | strings.TrimPrefix "© " }}</copyright>{{ end }}{{ if not .Date.IsZero }}
<lastBuildDate>{{ (index $pages.ByLastmod.Reverse 0).Lastmod.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</lastBuildDate>{{ end }}
{{- with .OutputFormats.Get "RSS" }}
{{ printf "<atom:link href=%q rel=\"self\" type=%q />" .Permalink .MediaType | safeHTML }}
Expand Down

0 comments on commit beb281a

Please sign in to comment.