Adding Safe templating function for keeping HTML comment

Closes #270
According to https://stackoverflow.com/questions/34348072/go-html-comments-are-not-rendered
This commit is contained in:
TomBoss 2021-02-15 13:33:47 +01:00 committed by GitHub
parent 42a31e4696
commit 50549f3bfe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -353,6 +353,9 @@ func (m *Manager) TemplateFuncs(c *models.Campaign) template.FuncMap {
"L": func() *i18n.I18n { "L": func() *i18n.I18n {
return m.i18n return m.i18n
}, },
"Safe": func(safeHTML string) template.HTML {
return template.HTML(safeHTML)
},
} }
} }