tpl: Enable safeHTMLAttr

See #2234 and #347
This commit is contained in:
marco
2016-06-22 13:21:04 +02:00
committed by Anthony Fok
parent cdd6a124c2
commit c21e2b3b4d
2 changed files with 1 additions and 6 deletions

View File

@@ -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,