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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user