From beb281a1c6bdce8cc34a3168dc383714f2b87322 Mon Sep 17 00:00:00 2001 From: Dmitry Konishchev Date: Sat, 13 Apr 2024 09:05:52 +0300 Subject: [PATCH] Fix copyright field rendering HTML in RSS feed (#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. --- layouts/_default/rss.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layouts/_default/rss.xml b/layouts/_default/rss.xml index 89dec2c..87949c9 100644 --- a/layouts/_default/rss.xml +++ b/layouts/_default/rss.xml @@ -59,7 +59,7 @@ {{ site.Language.LanguageCode }}{{ with $authorEmail }} {{.}}{{ with $authorName }} ({{ . }}){{ end }}{{ end }}{{ with $authorEmail }} {{ . }}{{ with $authorName }} ({{ . }}){{ end }}{{ end }}{{ with site.Copyright }} - {{ . }}{{ end }}{{ if not .Date.IsZero }} + {{ . | markdownify | plainify | strings.TrimPrefix "© " }}{{ end }}{{ if not .Date.IsZero }} {{ (index $pages.ByLastmod.Reverse 0).Lastmod.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}{{ end }} {{- with .OutputFormats.Get "RSS" }} {{ printf "" .Permalink .MediaType | safeHTML }}