Skip to content

Commit 50549f3

Browse files
authored
Adding Safe templating function for keeping HTML comment
Closes #270 According to https://stackoverflow.com/questions/34348072/go-html-comments-are-not-rendered
1 parent 42a31e4 commit 50549f3

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

internal/manager/manager.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -353,6 +353,9 @@ func (m *Manager) TemplateFuncs(c *models.Campaign) template.FuncMap {
353353
"L": func() *i18n.I18n {
354354
return m.i18n
355355
},
356+
"Safe": func(safeHTML string) template.HTML {
357+
return template.HTML(safeHTML)
358+
},
356359
}
357360
}
358361

0 commit comments

Comments
 (0)