diff options
| author | Chronial <git@chronial.de> | 2017-02-07 14:55:44 +0100 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2017-02-09 09:22:00 -0500 |
| commit | 03281d8fe7a32f580a85235659d4fbb143eeb867 (patch) | |
| tree | e76fceb2689965ab0c13306316eaa0421d53b812 /docs/ref/unicode.txt | |
| parent | 500532c95db40b0b24654be7bb0d76b66b022bd5 (diff) | |
Fixed #26005 -- Fixed some percent decoding cases in uri_to_iri().
Diffstat (limited to 'docs/ref/unicode.txt')
| -rw-r--r-- | docs/ref/unicode.txt | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/docs/ref/unicode.txt b/docs/ref/unicode.txt index b0a888e2f8..c20886775e 100644 --- a/docs/ref/unicode.txt +++ b/docs/ref/unicode.txt @@ -195,19 +195,17 @@ result. Similarly, Django provides :func:`django.utils.encoding.uri_to_iri()` which implements the conversion from URI to IRI as per :rfc:`3987#section-3.2`. -It decodes all percent-encodings except those that don't represent a valid -UTF-8 sequence. An example to demonstrate:: >>> uri_to_iri('/%E2%99%A5%E2%99%A5/?utf8=%E2%9C%93') '/♥♥/?utf8=✓' - >>> uri_to_iri('%A9helloworld') - '%A9helloworld' + >>> uri_to_iri('%A9hello%3Fworld') + '%A9hello%3Fworld' -In the first example, the UTF-8 characters and reserved characters are -unquoted. In the second, the percent-encoding remains unchanged because it -lies outside the valid UTF-8 range. +In the first example, the UTF-8 characters are unquoted. In the second, the +percent-encodings remain unchanged because they lie outside the valid UTF-8 +range or represent a reserved character. Both ``iri_to_uri()`` and ``uri_to_iri()`` functions are idempotent, which means the following is always true:: |
