Skip to content

Commit beb281a

Browse files
Fix copyright field rendering HTML in RSS feed (adityatelange#1479)
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.
1 parent 8577a8c commit beb281a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

layouts/_default/rss.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
<language>{{ site.Language.LanguageCode }}</language>{{ with $authorEmail }}
6060
<managingEditor>{{.}}{{ with $authorName }} ({{ . }}){{ end }}</managingEditor>{{ end }}{{ with $authorEmail }}
6161
<webMaster>{{ . }}{{ with $authorName }} ({{ . }}){{ end }}</webMaster>{{ end }}{{ with site.Copyright }}
62-
<copyright>{{ . }}</copyright>{{ end }}{{ if not .Date.IsZero }}
62+
<copyright>{{ . | markdownify | plainify | strings.TrimPrefix "© " }}</copyright>{{ end }}{{ if not .Date.IsZero }}
6363
<lastBuildDate>{{ (index $pages.ByLastmod.Reverse 0).Lastmod.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</lastBuildDate>{{ end }}
6464
{{- with .OutputFormats.Get "RSS" }}
6565
{{ printf "<atom:link href=%q rel=\"self\" type=%q />" .Permalink .MediaType | safeHTML }}

0 commit comments

Comments
 (0)