1
0
mirror of https://github.com/django/django.git synced 2025-10-28 08:06:09 +00:00

Changed default template filters to always return unicode (and to handle unicode input better). Also changed all django.utils.* functions that are used (or likely to be used) by filters to return unicode strings.

Most of the filter porting was done by Ivan Sagalaev. Fixed #3977.


git-svn-id: http://code.djangoproject.com/svn/django/branches/unicode@5056 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Malcolm Tredinnick
2007-04-21 14:34:43 +00:00
parent dadbe3c737
commit b30e5b5434
11 changed files with 356 additions and 370 deletions

View File

@@ -5,13 +5,13 @@
### smart_split ###########################################################
>>> list(smart_split(r'''This is "a person" test.'''))
['This', 'is', '"a person"', 'test.']
[u'This', u'is', u'"a person"', u'test.']
>>> print list(smart_split(r'''This is "a person's" test.'''))[2]
"a person's"
>>> print list(smart_split(r'''This is "a person\\"s" test.'''))[2]
"a person"s"
>>> list(smart_split('''"a 'one'''))
['"a', "'one"]
[u'"a', u"'one"]
>>> print list(smart_split(r'''all friends' tests'''))[1]
friends'
"""