diff options
author | marco <marco@webguerilla.net> | 2016-06-22 14:21:04 +0300 |
---|---|---|
committer | Anthony Fok <foka@debian.org> | 2016-06-27 18:18:14 +0300 |
commit | c21e2b3b4d759bc84ba080bc35059bb51eb34144 (patch) | |
tree | 96b3a4ebc81ff6e867f6df24be22772ff741fc35 /tpl | |
parent | cdd6a124c2763da57108adebe079baab5958076a (diff) |
tpl: Enable safeHTMLAttr
See #2234 and #347
Diffstat (limited to 'tpl')
-rw-r--r-- | tpl/template_funcs.go | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/tpl/template_funcs.go b/tpl/template_funcs.go index 80ecdfe0c..db785cbc0 100644 --- a/tpl/template_funcs.go +++ b/tpl/template_funcs.go @@ -1576,9 +1576,6 @@ func readDirFromWorkingDir(i interface{}) ([]os.FileInfo, error) { } // safeHTMLAttr returns a given string as html/template HTMLAttr content. -// -// safeHTMLAttr is currently disabled, pending further discussion -// on its use case. 2015-01-19 func safeHTMLAttr(a interface{}) template.HTMLAttr { return template.HTMLAttr(cast.ToString(a)) } @@ -1806,6 +1803,7 @@ func init() { "replaceRE": replaceRE, "safeCSS": safeCSS, "safeHTML": safeHTML, + "safeHTMLAttr": safeHTMLAttr, "safeJS": safeJS, "safeURL": safeURL, "sanitizeURL": helpers.SanitizeURL, |