Skip to content

Commit 573e673

Browse files
committed
Use content:encoded in Rss feeds
when using ShowFullTextinRSS
1 parent 0e3f44f commit 573e673

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

layouts/_default/rss.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
{{- $pages = $pages | first $limit -}}
1212
{{- end -}}
1313
{{- printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>" | safeHTML }}
14-
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
14+
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
1515
<channel>
1616
<title>{{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{.}} on {{ end }}{{ .Site.Title }}{{ end }}</title>
1717
<link>{{ .Permalink }}</link>
@@ -41,7 +41,7 @@
4141
<guid>{{ .Permalink }}</guid>
4242
<description>{{ with .Description | html }}{{ . }}{{ else }}{{ .Summary | html }}{{ end -}}</description>
4343
{{- if .Site.Params.ShowFullTextinRSS }}
44-
<content>{{ .Content | html }}</content>
44+
<content:encoded>{{ (printf "<![CDATA[%s]]>" .Content) | safeHTML }}</content:encoded>
4545
{{- end }}
4646
</item>
4747
{{- end }}

0 commit comments

Comments
 (0)