Skip to content

Commit 59d0e65

Browse files
lunnyzeripath
andcommitted
fix email with + when active (go-gitea#17518)
Co-authored-by: zeripath <[email protected]>
1 parent 9340269 commit 59d0e65

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
@@ -510,6 +510,7 @@ func NewTextFuncMap() []texttmpl.FuncMap {
510510
}
511511
return sum
512512
},
513+
"QueryEscape": url.QueryEscape,
513514
}}
514515
}
515516

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)