Django

Code

Changeset 5317

Show
Ignore:
Timestamp:
05/22/07 03:50:47 (2 years ago)
Author:
mtredinnick
Message:

unicode: Documented the new iriencode filter and added a test to prove one of
my claims.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/branches/unicode/docs/templates.txt

    r5054 r5317  
    10131013is less than 1). Otherwise, output is always an integer. 
    10141014 
     1015iriencode 
     1016~~~~~~~~~ 
     1017 
     1018Converts an IRI (Internationalized Resource Identifier) to a string that is 
     1019suitable for including in a URL. This is necessary if you are trying to use 
     1020strings containing non-ASCII characters in a URL. 
     1021 
     1022You can use this filter after you have used the ``urlencode`` filter on a 
     1023string, without harm. 
     1024 
    10151025join 
    10161026~~~~ 
  • django/branches/unicode/tests/regressiontests/defaultfilters/tests.py

    r5283 r5317  
    118118>>> iriencode(u'S\xf8r-Tr\xf8ndelag') 
    119119u'S%C3%B8r-Tr%C3%B8ndelag' 
     120>>> iriencode(urlencode(u'jack & jill')) 
     121u'jack%20%26%20jill' 
    120122 
    121123>>> urlizetrunc(u'http://short.com/', 20)