diff options
author | Feuerfuchs <git@feuerfuchs.dev> | 2019-06-05 17:29:31 +0200 |
---|---|---|
committer | Feuerfuchs <git@feuerfuchs.dev> | 2019-06-05 17:29:31 +0200 |
commit | 867ff4d28be2008adeab55cf2f155d7925132528 (patch) | |
tree | 67aef750230d4b65af678ccd7112c4a4961e2aa9 /gopherproxy.go | |
parent | Updated font handling (diff) | |
download | gopherproxy-867ff4d28be2008adeab55cf2f155d7925132528.tar.gz gopherproxy-867ff4d28be2008adeab55cf2f155d7925132528.tar.bz2 gopherproxy-867ff4d28be2008adeab55cf2f155d7925132528.zip |
Improved template readability
Diffstat (limited to 'gopherproxy.go')
-rw-r--r-- | gopherproxy.go | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/gopherproxy.go b/gopherproxy.go index 82215c5..e41af3d 100644 --- a/gopherproxy.go +++ b/gopherproxy.go | |||
@@ -223,9 +223,12 @@ func ListenAndServe(bind, robotsfile, uri string) error { | |||
223 | } | 223 | } |
224 | 224 | ||
225 | funcMap := template.FuncMap{ | 225 | funcMap := template.FuncMap{ |
226 | "safeCss": func(s string) template.CSS { | 226 | "safeHtml": func(s string) template.HTML { |
227 | return template.CSS(s) | 227 | return template.HTML(s) |
228 | }, | 228 | }, |
229 | "safeCss": func(s string) template.CSS { | ||
230 | return template.CSS(s) | ||
231 | }, | ||
229 | } | 232 | } |
230 | 233 | ||
231 | tpl, err = template.New("gophermenu").Funcs(funcMap).Parse(tpltext) | 234 | tpl, err = template.New("gophermenu").Funcs(funcMap).Parse(tpltext) |