fixes #764 - the TokenParser now respects string parameters to filters that contain blanks.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@1207 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Georg Bauer 2005-11-12 21:45:01 +00:00
parent f3d1f39559
commit 367ce0ce92
1 changed files with 7 additions and 0 deletions

View File

@ -301,6 +301,13 @@ class TokenParser:
else:
p = i
while i < len(subject) and subject[i] not in (' ', '\t'):
if subject[i] in ('"', "'"):
c = subject[i]
i += 1
while i < len(subject) and subject[i] != c:
i += 1
if i >= len(subject):
raise TemplateSyntaxError, "Searching for value. Unexpected end of string in column %d: %s" % subject
i += 1
s = subject[p:i]
while i < len(subject) and subject[i] in (' ', '\t'):