Skip to content

Commit f572fb9

Browse files
lunnyzeripath
andauthored
fix email with + when active (#17518) (#17520)
Co-authored-by: zeripath <[email protected]>
1 parent 9340269 commit f572fb9

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

modules/templates/helper.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -390,6 +390,7 @@ func NewFuncMap() []template.FuncMap {
390390
html += "</span>"
391391
return template.HTML(html)
392392
},
393+
"QueryEscape": url.QueryEscape,
393394
}}
394395
}
395396

@@ -510,6 +511,7 @@ func NewTextFuncMap() []texttmpl.FuncMap {
510511
}
511512
return sum
512513
},
514+
"QueryEscape": url.QueryEscape,
513515
}}
514516
}
515517

templates/mail/auth/activate_email.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<title>{{.i18n.Tr "mail.activate_email.title" .DisplayName}}</title>
66
</head>
77

8-
{{ $activate_url := printf "%suser/activate_email?code=%s&email=%s" AppUrl .Code .Email}}
8+
{{ $activate_url := printf "%suser/activate_email?code=%s&email=%s" AppUrl .Code (QueryEscape .Email)}}
99
<body>
1010
<p>{{.i18n.Tr "mail.hi_user_x" .DisplayName | Str2html}}</p><br>
1111
<p>{{.i18n.Tr "mail.activate_email.text" .ActiveCodeLives | Str2html}}</p><p><a href="{{$activate_url}}">{{$activate_url}}</a></p><br>

0 commit comments

Comments
 (0)