Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(login): (re)allow HTML in custom login texts #7575

Merged
merged 1 commit into from
Mar 15, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions internal/renderer/renderer.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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
}