mirror of
https://github.com/django/django.git
synced 2025-07-04 17:59:13 +00:00
unicode: Added a check to ensure that iri_to_uri() remains idempotent.
git-svn-id: http://code.djangoproject.com/svn/django/branches/unicode@5339 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
7b51097847
commit
545173ed4e
@ -31,4 +31,8 @@ u'Paris+%26+Orl%C3%A9ans'
|
|||||||
'/blog/for/J%C3%BCrgen%20M%C3%BCnster/'
|
'/blog/for/J%C3%BCrgen%20M%C3%BCnster/'
|
||||||
>>> iri_to_uri(u'locations/%s' % urlquote_plus(u'Paris & Orl\xe9ans'))
|
>>> iri_to_uri(u'locations/%s' % urlquote_plus(u'Paris & Orl\xe9ans'))
|
||||||
'locations/Paris+%26+Orl%C3%A9ans'
|
'locations/Paris+%26+Orl%C3%A9ans'
|
||||||
|
|
||||||
|
iri_to_uri() is idempotent:
|
||||||
|
>>> iri_to_uri(iri_to_uri(u'red%09ros\xe9#red'))
|
||||||
|
'red%09ros%C3%A9#red'
|
||||||
"""
|
"""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user