From: jordan Date: Sun, 27 May 2012 12:49:51 +0000 (+0000) Subject: be able to handle Unicode GET params in auth.py properly X-Git-Tag: live~48 X-Git-Url: https://git.openstreetmap.org./osqa.git/commitdiff_plain/b48485bf3bf42feb7d189d55d2551c40d75bd992 be able to handle Unicode GET params in auth.py properly git-svn-id: http://svn.osqa.net/svnroot/osqa/trunk@1269 0cfe37f9-358a-4d5e-be75-b63607b5c754 --- diff --git a/forum/views/auth.py b/forum/views/auth.py index 3b78eed..9511be9 100644 --- a/forum/views/auth.py +++ b/forum/views/auth.py @@ -291,7 +291,7 @@ def send_validation_email(request): # We don't care if there are previous cashes in the database... In every case we have to create a new one hash = ValidationHash.objects.create_new(request.user, 'email', [request.user.email]) - additional_get_params = urllib.urlencode(request.GET) + additional_get_params = urllib.urlencode(dict([k, v.encode('utf-8')] for k, v in request.GET.items())) send_template_email([request.user], "auth/mail_validation.html", { 'validation_code': hash, 'additional_get_params' : additional_get_params @@ -409,7 +409,7 @@ def login_and_forward(request, user, forward=None, message=None): else: return manage_pending_data(request, _('save'), forward) - additional_get_params = urllib.urlencode(request.GET) + additional_get_params = urllib.urlencode(dict([k, v.encode('utf-8')] for k, v in request.GET.items())) parsed_forward = urlparse(forward)