1
0
mirror of https://github.com/django/django.git synced 2025-10-23 21:59:11 +00:00

Fixed #9315 -- Handle spaces in URL tag arguments.

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

git-svn-id: http://code.djangoproject.com/svn/django/trunk@10462 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Malcolm Tredinnick
2009-04-10 04:13:27 +00:00
parent f6309cbf80
commit be4a83c448
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