Add safeHTML function
This commit is contained in:
parent
af04605d7d
commit
1ace129a58
1 changed files with 3 additions and 0 deletions
|
|
@ -21,6 +21,9 @@ var globalTemplateFunctions = template.FuncMap{
|
||||||
"safeURL": func(str string) template.URL {
|
"safeURL": func(str string) template.URL {
|
||||||
return template.URL(str)
|
return template.URL(str)
|
||||||
},
|
},
|
||||||
|
"safeHTML": func(str string) template.HTML {
|
||||||
|
return template.HTML(str)
|
||||||
|
},
|
||||||
"absInt": func(i int) int {
|
"absInt": func(i int) int {
|
||||||
return int(math.Abs(float64(i)))
|
return int(math.Abs(float64(i)))
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue