diff --git a/modules/templates/helper.go b/modules/templates/helper.go index 5679487498..0f39767586 100644 --- a/modules/templates/helper.go +++ b/modules/templates/helper.go @@ -37,7 +37,7 @@ func NewFuncMap() template.FuncMap { "Eval": Eval, "SafeHTML": SafeHTML, "HTMLFormat": HTMLFormat, - "Escape": Escape, + "HTMLEscape": HTMLEscape, "QueryEscape": url.QueryEscape, "JSEscape": JSEscapeSafe, "Str2html": Str2html, // TODO: rename it to SanitizeHTML @@ -218,7 +218,7 @@ func Str2html(s any) template.HTML { panic(fmt.Sprintf("unexpected type %T", s)) } -func Escape(s any) template.HTML { +func HTMLEscape(s any) template.HTML { switch v := s.(type) { case string: return template.HTML(html.EscapeString(v)) diff --git a/templates/code/searchcombo.tmpl b/templates/code/searchcombo.tmpl index d256890918..d451bc0ad8 100644 --- a/templates/code/searchcombo.tmpl +++ b/templates/code/searchcombo.tmpl @@ -7,7 +7,7 @@ {{else if .SearchResults}}
{{.locale.Tr "mail.hi_user_x" (.DisplayName|DotEscape)}}
{{.locale.Tr "mail.register_notify.text_1" AppName}}
{{.locale.Tr "mail.register_notify.text_2" .Username}}
{{.locale.Tr "mail.register_notify.text_3" ($set_pwd_url | Escape)}}
{{.locale.Tr "mail.register_notify.text_3" $set_pwd_url}}