1
0
mirror of https://github.com/django/django.git synced 2025-10-31 09:41:08 +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

@@ -480,8 +480,7 @@ filter_raw_string = r"""
'arg_sep': re.escape(FILTER_ARGUMENT_SEPARATOR),
}
filter_raw_string = filter_raw_string.replace("\n", "").replace(" ", "")
filter_re = re.compile(filter_raw_string, re.UNICODE)
filter_re = re.compile(filter_raw_string, re.UNICODE|re.VERBOSE)
class FilterExpression(object):
r"""

View File

@@ -1100,7 +1100,7 @@ def url(parser, token):
The URL will look like ``/clients/client/123/``.
"""
bits = token.contents.split(' ')
bits = token.split_contents()
if len(bits) < 2:
raise TemplateSyntaxError("'%s' takes at least one argument"
" (path to a view)" % bits[0])