Procházet zdrojové kódy

fix(feed): parse {year} in copyright and plainify any HTML

Close #1243
George Cushen před 6 roky
rodič
revize
2f19f9c9fd
1 změnil soubory, kde provedl 1 přidání a 1 odebrání
  1. 1 1
      layouts/_default/rss.xml

+ 1 - 1
layouts/_default/rss.xml

@@ -14,7 +14,7 @@
     <language>{{.}}</language>{{end}}{{ with site.Author.email }}
     <managingEditor>{{.}}{{ with site.Author.name }} ({{.}}){{end}}</managingEditor>{{end}}{{ with site.Author.email }}
     <webMaster>{{.}}{{ with site.Author.name }} ({{.}}){{end}}</webMaster>{{end}}{{ with site.Copyright }}
-    <copyright>{{.}}</copyright>{{end}}{{ if not .Date.IsZero }}
+    <copyright>{{replace . "{year}" now.Year | plainify}}</copyright>{{end}}{{ if not .Date.IsZero }}
     <lastBuildDate>{{ .Date.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 }}