summaryrefslogtreecommitdiffstats
path: root/layouts
diff options
context:
space:
mode:
authorSerghei Iakovlev <egrep@protonmail.ch>2022-05-17 09:15:01 +0200
committerSerghei Iakovlev <egrep@protonmail.ch>2022-05-17 09:15:21 +0200
commit94f67e5829a7239ced73c3f18072a761a4ced176 (patch)
tree2a31a3467855eef58eedeffcf775a7de0b655cfa /layouts
parent4f466a4fefb1ea97b37bd2d11c03d50871b5b002 (diff)
downloadgohugo-theme-ed-94f67e5829a7239ced73c3f18072a761a4ced176.tar.gz
Escaped some stuff in atom feed
Diffstat (limited to 'layouts')
-rw-r--r--layouts/_default/home.atom.xml18
1 files changed, 7 insertions, 11 deletions
diff --git a/layouts/_default/home.atom.xml b/layouts/_default/home.atom.xml
index b1befc0..ff6cda4 100644
--- a/layouts/_default/home.atom.xml
+++ b/layouts/_default/home.atom.xml
@@ -3,14 +3,14 @@
xmlns:media="http://search.yahoo.com/mrss/"
xml:lang="{{ site.LanguageCode }}"
xml:base="{{site.BaseURL }}">
- <title>{{ site.Title }}</title>
- {{ with site.Params.description }}<subtitle>{{ . }}</subtitle>{{ end }}
+ <title>{{ printf "<![CDATA[%s]]>" site.Title | safeHTML }}</title>
+ {{ with site.Params.description }}<subtitle type="html">{{ printf "<![CDATA[%s]]>" . | safeHTML }}</subtitle>{{ end }}
{{ with site.Home.OutputFormats.Get "Atom" }}<link href="{{ .RelPermalink }}" rel="self" type="{{ .MediaType.Type | html }}" />{{ end }}
{{ $logo := resources.Get (site.Params.assets.logo | default "/img/open-graph-logo.png" ) }}{{ $logo = $logo.Resize "96x96" }}<icon>{{$logo.RelPermalink}}</icon>
<logo>{{$logo.RelPermalink}}</logo>
{{ with site.Author.name }}<author>
- <name>{{.}}</name>
- {{ with site.Author.email }}<email>{{.}}</email>{{end}}
+ <name>{{ printf "<![CDATA[%s]]>" . | safeHTML }}</name>
+ {{ with site.Author.email }}<email>{{ . }}</email>{{end}}
</author>{{end}}
{{ with site.Params.Copyright }}<rights type="text">{{ .}}</rights>{{end}}
<generator uri="https://gohugo.io" version="{{ hugo.Version }}">Hugo</generator>
@@ -21,9 +21,7 @@
<entry>
{{- $url := .RelPermalink }}{{ $uuid := sha1 (.Permalink | absURL)}}{{ $page := .}}
<category term="{{ .Section}}" />
- {{ range (.GetTerms "tags") }}
- <category term="{{ .LinkTitle }}" />
- {{ end }}
+ {{ range (.GetTerms "tags") }}<category term="{{ .LinkTitle }}" />{{ end }}
<link rel="alternate" type="type/html" href="{{ $url }}" />
<title type="text">{{ .Title | plainify}}</title>
<published>{{ (.PublishDate.Format site.Params.dateFormatFeed) | html }}</published>
@@ -43,10 +41,8 @@
{{ end }}
{{- end }}
{{ end }}
- <summary type="xhtml">
- <div xmlns="http://www.w3.org/1999/xhtml">
- <p>{{ replaceRE "\n" " " (.Summary | plainify | safeHTML | chomp) }}</p>
- </div>
+ <summary type="html">
+ {{ printf "<![CDATA[%s]]>" .Summary | safeHTML }}
</summary>
</entry>
{{- end }}