Skip to content

Commit

Permalink
fix: unsafe html warnings (#531)
Browse files Browse the repository at this point in the history
  • Loading branch information
lxndrblz authored Dec 26, 2024
1 parent 8f36fa2 commit 056ff32
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion exampleSite/config/_default/hugo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ localizedDates = false
[markup]
[markup.goldmark]
[markup.goldmark.renderer]
unsafe=true
unsafe=false

[taxonomies]
category = "categories"
Expand Down
4 changes: 2 additions & 2 deletions layouts/_default/rss.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
4 changes: 2 additions & 2 deletions layouts/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@ <h3><a href="{{ .RelPermalink }}">{{ .Title }}</a></h3>
<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) -}}
Expand Down

0 comments on commit 056ff32

Please sign in to comment.