Browse Source

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

Close #1243
George Cushen 6 năm trước cách đây
mục cha
commit
2f19f9c9fd
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  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 }}