mirror of
https://git.sr.ht/~adnano/kiln
synced 2024-11-24 03:01:11 +00:00
Add safeHTML, safeCSS, etc. functions
This commit is contained in:
parent
d7567ca69f
commit
e976aa1be7
|
@ -70,9 +70,11 @@ func LoadConfig(path string) (*Config, error) {
|
|||
}
|
||||
return b.String(), nil
|
||||
},
|
||||
"html": func(s string) template.HTML {
|
||||
return template.HTML(s)
|
||||
},
|
||||
"safeHTML": func(s string) template.HTML { return template.HTML(s) },
|
||||
"safeHTMLAttr": func(s string) template.HTMLAttr { return template.HTMLAttr(s) },
|
||||
"safeCSS": func(s string) template.CSS { return template.CSS(s) },
|
||||
"safeJS": func(s string) template.JS { return template.JS(s) },
|
||||
"safeURL": func(s string) template.URL { return template.URL(s) },
|
||||
})
|
||||
|
||||
return c, nil
|
||||
|
|
Loading…
Reference in a new issue