From 867ff4d28be2008adeab55cf2f155d7925132528 Mon Sep 17 00:00:00 2001 From: Feuerfuchs Date: Wed, 5 Jun 2019 17:29:31 +0200 Subject: Improved template readability --- gopherproxy.go | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'gopherproxy.go') 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 { } funcMap := template.FuncMap{ - "safeCss": func(s string) template.CSS { - return template.CSS(s) - }, + "safeHtml": func(s string) template.HTML { + return template.HTML(s) + }, + "safeCss": func(s string) template.CSS { + return template.CSS(s) + }, } tpl, err = template.New("gophermenu").Funcs(funcMap).Parse(tpltext) -- cgit v1.2.3-54-g00ecf