diff options
| author | Jacob Kaplan-Moss <jacob@jacobian.org> | 2009-04-07 19:50:42 +0000 |
|---|---|---|
| committer | Jacob Kaplan-Moss <jacob@jacobian.org> | 2009-04-07 19:50:42 +0000 |
| commit | 0c85192ebeb374e7a7ad8e72ebecdf173d7fdcce (patch) | |
| tree | f3f94a9f4977c2e399bb306d3c4656898da35fba /django | |
| parent | f78c70b3b21cb28ce77b674706bb64b297ab0649 (diff) | |
[1.0.X] Fixed #10585: comment redirects built from the `next` parameter now work correctly when `next` already contains a query string. Backport of r10424 from trunk.
git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10425 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django')
| -rw-r--r-- | django/contrib/comments/views/utils.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/django/contrib/comments/views/utils.py b/django/contrib/comments/views/utils.py index a37c555e78..c5c900d47f 100644 --- a/django/contrib/comments/views/utils.py +++ b/django/contrib/comments/views/utils.py @@ -25,7 +25,8 @@ def next_redirect(data, default, default_view, **get_kwargs): if next is None: next = urlresolvers.reverse(default_view) if get_kwargs: - next += "?" + urllib.urlencode(get_kwargs) + joiner = ('?' in next) and '&' or '?' + next += joiner + urllib.urlencode(get_kwargs) return HttpResponseRedirect(next) def confirmation_view(template, doc="Display a confirmation view."): |
