Merge pull request #465 from reduxionist/bugfix/urlquote-email-in-redirect

urlquote email address when used as get query param
This commit is contained in:
Jonathan Barratt 2016-12-11 23:27:52 +07:00 committed by GitHub
commit 6908e956e0

View File

@ -10,6 +10,7 @@ from django.core.exceptions import ObjectDoesNotExist
from django.core.urlresolvers import reverse
from django.http import HttpResponseRedirect
from django.shortcuts import render
from django.utils.http import urlquote
from django.utils.translation import ugettext as _
from helpdesk import settings as helpdesk_settings
@ -46,7 +47,7 @@ def homepage(request):
return HttpResponseRedirect('%s?ticket=%s&email=%s' % (
reverse('helpdesk:public_view'),
ticket.ticket_for_url,
ticket.submitter_email)
urlquote(ticket.submitter_email))
)
else:
try: