1
0
mirror of https://github.com/django/django.git synced 2025-10-24 22:26:08 +00:00

[1.0.X] Fixed #9315 -- Handle spaces in URL tag arguments.

Thanks Natalia Bidart and Matías Bordese for most of this patch.

Backport of r10462 from trunk.

git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10463 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Malcolm Tredinnick
2009-04-10 04:49:00 +00:00
parent 6c45765681
commit dd7198701a
6 changed files with 24 additions and 4 deletions

View File

@@ -15,6 +15,18 @@ r"""
[u'"a', u"'one"]
>>> print list(smart_split(r'''all friends' tests'''))[1]
friends'
>>> list(smart_split(u'url search_page words="something else"'))
[u'url', u'search_page', u'words="something else"']
>>> list(smart_split(u"url search_page words='something else'"))
[u'url', u'search_page', u"words='something else'"]
>>> list(smart_split(u'url search_page words "something else"'))
[u'url', u'search_page', u'words', u'"something else"']
>>> list(smart_split(u'url search_page words-"something else"'))
[u'url', u'search_page', u'words-"something else"']
>>> list(smart_split(u'url search_page words=hello'))
[u'url', u'search_page', u'words=hello']
>>> list(smart_split(u'url search_page words="something else'))
[u'url', u'search_page', u'words="something', u'else']
### urlquote #############################################################
>>> from django.utils.http import urlquote, urlquote_plus