mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-05-01 00:10:17 -05:00
template.HTML is safe to use in this case G203
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
This commit is contained in:
@@ -67,11 +67,12 @@ func RenderEmailTemplate(mt MessageTemplate, locale, defaultLocale string, email
|
||||
}, nil
|
||||
}
|
||||
|
||||
// emailTemplate builds the email template. It does not use any user provided input, so it is safe to use template.HTML.
|
||||
func emailTemplate(tpl *template.Template, mt MessageTemplate) (string, error) {
|
||||
str, err := executeTemplate(tpl, map[string]interface{}{
|
||||
"Greeting": template.HTML(strings.TrimSpace(mt.Greeting)),
|
||||
"MessageBody": template.HTML(strings.TrimSpace(mt.MessageBody)),
|
||||
"CallToAction": template.HTML(strings.TrimSpace(mt.CallToAction)),
|
||||
"Greeting": template.HTML(strings.TrimSpace(mt.Greeting)), // #nosec G203
|
||||
"MessageBody": template.HTML(strings.TrimSpace(mt.MessageBody)), // #nosec G203
|
||||
"CallToAction": template.HTML(strings.TrimSpace(mt.CallToAction)), // #nosec G203
|
||||
})
|
||||
if err != nil {
|
||||
return "", err
|
||||
|
||||
Reference in New Issue
Block a user