From 6c3f48f49617478acfba89256d0dce62f6cb2d90 Mon Sep 17 00:00:00 2001 From: Livio Spring Date: Fri, 15 Mar 2024 16:29:10 +0100 Subject: [PATCH] fix(login): (re)allow HTML in custom login texts (#7575) fix: allow HTML in custom login texts --- internal/renderer/renderer.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/renderer/renderer.go b/internal/renderer/renderer.go index cc4d1c6ccf..42ccc98936 100644 --- a/internal/renderer/renderer.go +++ b/internal/renderer/renderer.go @@ -123,7 +123,7 @@ func (r *Renderer) registerTranslateFn(req *http.Request, translator *i18n.Trans if translator == nil { return funcs } - funcs[TranslateFn] = func(id string, args ...interface{}) string { + funcs[TranslateFn] = func(id string, args ...interface{}) template.HTML { m := map[string]interface{}{} var key string for i, arg := range args { @@ -134,9 +134,9 @@ func (r *Renderer) registerTranslateFn(req *http.Request, translator *i18n.Trans m[key] = arg } if r == nil { - return r.Localize(translator, id, m) + return template.HTML(r.Localize(translator, id, m)) } - return r.LocalizeFromRequest(translator, req, id, m) + return template.HTML(r.LocalizeFromRequest(translator, req, id, m)) } return funcs }