Add safeHtml template function.

Fixes https://github.com/prometheus/alertmanager/issues/314
This commit is contained in:
Julius Volz 2016-04-20 16:14:40 +02:00
parent 7a14971042
commit ecd856a401
1 changed files with 3 additions and 0 deletions

View File

@ -127,6 +127,9 @@ var DefaultFuncs = FuncMap{
"join": func(sep string, s []string) string {
return strings.Join(s, sep)
},
"safeHtml": func(text string) tmplhtml.HTML {
return tmplhtml.HTML(text)
},
}
// Pair is a key/value string pair.