diff options
| author | Malcolm Tredinnick <malcolm.tredinnick@gmail.com> | 2007-05-19 00:17:23 +0000 |
|---|---|---|
| committer | Malcolm Tredinnick <malcolm.tredinnick@gmail.com> | 2007-05-19 00:17:23 +0000 |
| commit | 3d74a68a5108b49ccca20482d1fde88e4f3cbdfd (patch) | |
| tree | 29a11bf542b57362bd07b946baa0eb2e12414a2a /django/utils | |
| parent | 68a0f4f51b209c9daa2dc6ff31690c273979282c (diff) | |
unicode: Fixed iri_to_uri() to be not quite as broken (I think it's spec
compliant now). Removed use of iri_to_uri() in the urlencode filter and made a
new iriencode filter, because IRI->URI conversionis are not a superset of URL
quoting converstions.
git-svn-id: http://code.djangoproject.com/svn/django/branches/unicode@5283 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/utils')
| -rw-r--r-- | django/utils/encoding.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/django/utils/encoding.py b/django/utils/encoding.py index 7466e02300..5bb23a28bf 100644 --- a/django/utils/encoding.py +++ b/django/utils/encoding.py @@ -66,5 +66,8 @@ def iri_to_uri(iri): Returns an ASCII string containing the encoded result. """ - return urllib.quote(smart_str(iri), safe='/#%[]') + # The list of safe characters here is constructed from the printable ASCII + # characters that are not explicitly excluded by the list at the end of + # section 3.1 of RFC 3987. + return urllib.quote(smart_str(iri), safe='/#%[]=:;$&()+,!?') |
