1
0
mirror of https://github.com/django/django.git synced 2025-10-31 09:41:08 +00:00

Fixed #16842 -- Modified the RedirectView to correctly handle query strings with percent symbols. Thanks, accuser, jamey@minilop.net and Claude Paroz.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@17625 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Jannis Leidel
2012-03-02 16:55:56 +00:00
parent 7b624c6c32
commit 4887a8de17
2 changed files with 10 additions and 4 deletions

View File

@@ -139,12 +139,11 @@ class RedirectView(View):
are provided as kwargs to this method.
"""
if self.url:
url = self.url % kwargs
args = self.request.META.get('QUERY_STRING', '')
if args and self.query_string:
url = "%s?%s" % (self.url, args)
else:
url = self.url
return url % kwargs
url = "%s?%s" % (url, args)
return url
else:
return None