#13260: urlresolvers.reverse() generates invalid URLs when an argument contains
%
character
-------------------------------------+--------------------------------------
Reporter: semenov | Owner: stumbles
Status: assigned | Milestone:
Component: Core framework | Version: 1.1
Resolution: | Keywords:
Stage: Accepted | Has_patch: 1
Needs_docs: 0 | Needs_tests: 0
Needs_better_patch: 0 |
-------------------------------------+--------------------------------------
Comment (by stumbles):
Replying to [comment:5 semenov]:
> I believe this patch is not complete. The existing behavior replaces ' '
with '%20'. As you added an explicit call to urlquote(), that logic
supposedly got redundant and had to be removed, but I don't see that in
the patch.
The call to iri_to_uri() does replace some characters that are prohibited
in URIs. You're correct, that there's some duplicate checking for these
characters, but I don't think it can be removed.
Looking at this ticket again though, I don't think that it's right to
supply any safe chars to my call to urlquote. What this would mean though
is that either some of the tests are wrong or that it's the user's
responsibility to only put valid characters in reverse's args and kwargs
(meaning this isn't a bug). Will raise on django-dev.
--
Ticket URL: <http://code.djangoproject.com/ticket/13260#comment:6>
Django <http://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en.