mirror of
https://github.com/miniflux/v2.git
synced 2025-09-15 18:57:04 +00:00
refactor(template): rename noescape to safeHTML
This makes the code more consistent, since all the other escaping escape hatches have a `safe` prefix.
This commit is contained in:
parent
60cd7ffe88
commit
1abbb20e0c
2 changed files with 3 additions and 3 deletions
|
@ -60,7 +60,7 @@ func (f *funcMap) Map() template.FuncMap {
|
||||||
"safeJS": func(str string) template.JS {
|
"safeJS": func(str string) template.JS {
|
||||||
return template.JS(str)
|
return template.JS(str)
|
||||||
},
|
},
|
||||||
"noescape": func(str string) template.HTML {
|
"safeHTML": func(str string) template.HTML {
|
||||||
return template.HTML(str)
|
return template.HTML(str)
|
||||||
},
|
},
|
||||||
"proxyFilter": func(data string) string {
|
"proxyFilter": func(data string) string {
|
||||||
|
|
|
@ -280,9 +280,9 @@
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
{{ if .user }}
|
{{ if .user }}
|
||||||
{{ noescape (proxyFilter .entry.Content) }}
|
{{ safeHTML (proxyFilter .entry.Content) }}
|
||||||
{{ else }}
|
{{ else }}
|
||||||
{{ noescape .entry.Content }}
|
{{ safeHTML .entry.Content }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</article>
|
</article>
|
||||||
{{ if .entry.Enclosures }}
|
{{ if .entry.Enclosures }}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue