ref: 062f6c33837dc9755959ca9f3a5659204b0b3857
parent: dcf1f96c2de5b3c0bcefd0741caf350318c4cbbd
author: spf13 <[email protected]>
date: Thu Nov 12 05:53:21 EST 2015
rewrite safeHTML function
--- a/tpl/template_funcs.go
+++ b/tpl/template_funcs.go
@@ -1167,10 +1167,6 @@
return t.Format(layout), nil
}
-func SafeHTML(text string) template.HTML {
- return template.HTML(text)
-}
-
// "safeHTMLAttr" is currently disabled, pending further discussion
// on its use case. 2015-01-19
func SafeHTMLAttr(text string) template.HTMLAttr {
@@ -1384,7 +1380,7 @@
"isSet": IsSet,
"isset": IsSet,
"echoParam": ReturnWhenSet,
- "safeHTML": SafeHTML,
+ "safeHTML": func(a string) template.HTML { return template.HTML(a) },
"safeCSS": SafeCSS,
"safeURL": SafeURL,
"absURL": func(a string) template.HTML { return template.HTML(helpers.AbsURL(a)) },