From 50549f3bfe91d6a8db25d4ae1c986b027abb456e Mon Sep 17 00:00:00 2001 From: TomBoss Date: Mon, 15 Feb 2021 13:33:47 +0100 Subject: [PATCH] Adding Safe templating function for keeping HTML comment Closes #270 According to https://stackoverflow.com/questions/34348072/go-html-comments-are-not-rendered --- internal/manager/manager.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/internal/manager/manager.go b/internal/manager/manager.go index 58e2af6..9657b80 100644 --- a/internal/manager/manager.go +++ b/internal/manager/manager.go @@ -353,6 +353,9 @@ func (m *Manager) TemplateFuncs(c *models.Campaign) template.FuncMap { "L": func() *i18n.I18n { return m.i18n }, + "Safe": func(safeHTML string) template.HTML { + return template.HTML(safeHTML) + }, } }