diff options
| author | Aditya Telange <21258296+adityatelange@users.noreply.github.com> | 2021-05-02 11:29:31 +0530 |
|---|---|---|
| committer | Aditya Telange <21258296+adityatelange@users.noreply.github.com> | 2021-05-02 11:29:31 +0530 |
| commit | 573e673efae17255fc46ae44670de9ce51faf9d8 (patch) | |
| tree | 170929963c6a757a93bd0af7ca9c4721758ce02f /layouts/_default/rss.xml | |
| parent | 0e3f44ff17f4e82dfec4157ce5c9c672a1282e9e (diff) | |
Use `content:encoded` in Rss feeds
when using ShowFullTextinRSS
Diffstat (limited to 'layouts/_default/rss.xml')
| -rw-r--r-- | layouts/_default/rss.xml | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/layouts/_default/rss.xml b/layouts/_default/rss.xml index 8070d9d..eca41b7 100644 --- a/layouts/_default/rss.xml +++ b/layouts/_default/rss.xml @@ -11,7 +11,7 @@ {{- $pages = $pages | first $limit -}} {{- end -}} {{- printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>" | safeHTML }} -<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"> +<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"> <channel> <title>{{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{.}} on {{ end }}{{ .Site.Title }}{{ end }}</title> <link>{{ .Permalink }}</link> @@ -41,7 +41,7 @@ <guid>{{ .Permalink }}</guid> <description>{{ with .Description | html }}{{ . }}{{ else }}{{ .Summary | html }}{{ end -}}</description> {{- if .Site.Params.ShowFullTextinRSS }} - <content>{{ .Content | html }}</content> + <content:encoded>{{ (printf "<![CDATA[%s]]>" .Content) | safeHTML }}</content:encoded> {{- end }} </item> {{- end }} |
