#22379: Escaping needed during lazy reversing of non-ascii URLs
-----------------------------+--------------------
Reporter: jnns | Owner: nobody
Type: Bug | Status: new
Component: Core (URLs) | Version: 1.6
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
-----------------------------+--------------------
{{{
# urls.py
url(ur'^umläute_in_der_url/', include('my_app.urls')),
}}}
Reversing the above URL with non-ascii characters returns a properly
percent-encoded string (i.e. 'uml%C3%A4ute_in_der_url').
But a problem occurs while passing the named URL to `reverse_lazy` because
around line 164 in `django.utils.functional.lazy.__mod__` a string
formatting takes place which leads to a ValueError due to the unescaped
percent-encoding.
> ValueError: unsupported format character 'C' (0x43)
{{{
return bytes(self) % rhs
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/22379>
Django <https://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 unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/047.ce2db8692b17903b99ab98f99bc74d74%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.