Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
mentors.debian.net
debexpo
Commits
957404a9
Verified
Commit
957404a9
authored
Feb 23, 2020
by
Baptiste Beauplat
Browse files
Unescape html before urlencode in mailto link for RFS template (Closes:
#90
)
parent
e0eb7a26
Changes
1
Hide whitespace changes
Inline
Side-by-side
debexpo/controllers/sponsor.py
View file @
957404a9
...
@@ -42,6 +42,7 @@ import struct
...
@@ -42,6 +42,7 @@ import struct
import
socket
import
socket
import
json
import
json
import
urllib
import
urllib
from
HTMLParser
import
HTMLParser
from
debexpo.lib.base
import
BaseController
,
c
,
config
,
render
,
session
,
\
from
debexpo.lib.base
import
BaseController
,
c
,
config
,
render
,
session
,
\
redirect
,
url
,
abort
,
request
,
SubMenu
,
_
redirect
,
url
,
abort
,
request
,
SubMenu
,
_
...
@@ -327,7 +328,8 @@ class SponsorController(BaseController):
...
@@ -327,7 +328,8 @@ class SponsorController(BaseController):
# This is a workaround for Thunderbird and some other clients
# This is a workaround for Thunderbird and some other clients
# not handling properly '+' in the mailto body parameter.
# not handling properly '+' in the mailto body parameter.
c
.
mailbody
=
render
(
'/sponsor/rfs_template.mako'
)
c
.
mailbody
=
render
(
'/sponsor/rfs_template.mako'
)
c
.
mailbody
=
urllib
.
quote_plus
(
c
.
mailbody
.
encode
(
'utf-8'
))
\
c
.
mailbody
=
urllib
.
quote_plus
(
HTMLParser
().
unescape
(
unicode
(
c
.
mailbody
)).
encode
(
'utf-8'
))
\
.
replace
(
'+'
,
'%20'
)
.
replace
(
'+'
,
'%20'
)
return
render
(
'/sponsor/rfs_howto.mako'
)
return
render
(
'/sponsor/rfs_howto.mako'
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment