diff --git a/docs/content/templates/functions.md b/docs/content/templates/functions.md index 7b6e0a3ee..84767b224 100644 --- a/docs/content/templates/functions.md +++ b/docs/content/templates/functions.md @@ -546,7 +546,6 @@ rendering the whole string as plain-text like this:
© 2015 Jane Doe. <a href="http://creativecommons.org/licenses/by/4.0/">Some rights reserved</a>.
- - ### safeCSS Declares the provided string as a known "safe" CSS string 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,