matcornic/hermes

Add "safe/unescape HTML" to templateFuncs

Closed this issue · 0 comments

Reason

There are times where we want to style Intros, Outros or other elements in hermes.Body. Adding a html func (like url) to render HTML elements will be helpful for these scenarios.

hermes.go 

var templateFuncs = template.FuncMap{
	"url": func(s string) template.URL {
		return template.URL(s)
	},
+	"html": func(s string) template.HTML {
+		return template.HTML(s)
+	},
}