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