mirror of
https://github.com/gohugoio/hugo.git
synced 2025-04-20 12:03:09 +00:00
rewrite safeHTML function
This commit is contained in:
parent
dcf1f96c2d
commit
062f6c3383
1 changed files with 1 additions and 5 deletions
|
@ -1167,10 +1167,6 @@ func DateFormat(layout string, v interface{}) (string, error) {
|
||||||
return t.Format(layout), nil
|
return t.Format(layout), nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func SafeHTML(text string) template.HTML {
|
|
||||||
return template.HTML(text)
|
|
||||||
}
|
|
||||||
|
|
||||||
// "safeHTMLAttr" is currently disabled, pending further discussion
|
// "safeHTMLAttr" is currently disabled, pending further discussion
|
||||||
// on its use case. 2015-01-19
|
// on its use case. 2015-01-19
|
||||||
func SafeHTMLAttr(text string) template.HTMLAttr {
|
func SafeHTMLAttr(text string) template.HTMLAttr {
|
||||||
|
@ -1384,7 +1380,7 @@ func init() {
|
||||||
"isSet": IsSet,
|
"isSet": IsSet,
|
||||||
"isset": IsSet,
|
"isset": IsSet,
|
||||||
"echoParam": ReturnWhenSet,
|
"echoParam": ReturnWhenSet,
|
||||||
"safeHTML": SafeHTML,
|
"safeHTML": func(a string) template.HTML { return template.HTML(a) },
|
||||||
"safeCSS": SafeCSS,
|
"safeCSS": SafeCSS,
|
||||||
"safeURL": SafeURL,
|
"safeURL": SafeURL,
|
||||||
"absURL": func(a string) template.HTML { return template.HTML(helpers.AbsURL(a)) },
|
"absURL": func(a string) template.HTML { return template.HTML(helpers.AbsURL(a)) },
|
||||||
|
|
Loading…
Add table
Reference in a new issue