mirror of https://github.com/lxndrblz/anatole.git

Alexander Bilz
26.16.2024 056ff3230698a3bec8ab75897b2085032b513b3a
fix: unsafe html warnings (#531)

3 files modified
10 ■■■■ changed files
exampleSite/config/_default/hugo.toml 2 ●●● patch | view | raw | blame | history
layouts/_default/rss.xml 4 ●●●● patch | view | raw | blame | history
layouts/index.html 4 ●●●● patch | view | raw | blame | history
exampleSite/config/_default/hugo.toml
@@ -25,7 +25,7 @@
[markup]
    [markup.goldmark]
        [markup.goldmark.renderer]
        unsafe=true
        unsafe=false
[taxonomies]
    category = "categories"
layouts/_default/rss.xml
@@ -33,11 +33,11 @@
      {{ with .Site.Author.email }}<author>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</author>{{end}}
      <guid>{{ .Permalink }}</guid>
      {{ if eq .Site.Params.rssFullContent true }}
        <description>{{ .Content | html }}</description>
        <description>{{ .Content | safeHTML }}</description>
      {{ else if .Description }}
        <description>{{ .Description }}</description>
      {{ else }}
        <description>{{ .Summary | html }}</description>
        <description>{{ .Summary | safeHTML }}</description>
      {{ end }}
    </item>
    {{ end }}
layouts/index.html
@@ -55,9 +55,9 @@
          <h3><a href="{{ .RelPermalink }}">{{ upper .Title }}</a></h3>
        {{ end }}
        {{ if .Site.Params.fullPostContent }}
          <p>{{ .Content | markdownify }}</p>
          <p>{{ .Content | safeHTML }}</p>
        {{ else }}
          <p>{{ .Summary | markdownify }}</p>
          <p>{{ .Summary | safeHTML }}</p>
        {{ end }}
        <!-- add read more -->
        {{- if and (.Truncated) (.Site.Params.readMore) -}}