Ticket #10735: comment_redirect_bug.diff

File comment_redirect_bug.diff, 549 bytes (added by Nate, 15 years ago)
  • utils.py

     
    2525    if next is None:
    2626        next = urlresolvers.reverse(default_view)
    2727    if get_kwargs:
    28         next += "?" + urllib.urlencode(get_kwargs)
     28        import re
     29        head = '&' if re.search(r'.*?[^/]+', next) else '?'
     30        next += head + urllib.urlencode(get_kwargs)
    2931    return HttpResponseRedirect(next)
    3032
    3133def confirmation_view(template, doc="Display a confirmation view."):
Back to Top