Skip to content

Commit e69521f

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

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

modules/templates/helper.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -498,6 +498,7 @@ func NewTextFuncMap() []texttmpl.FuncMap {
498498
}
499499
return sum
500500
},
501+
"QueryEscape": url.QueryEscape,
501502
}}
502503
}
503504

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)