Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fixes #764 - the TokenParser now respects string parameters to filter…

…s that contain blanks.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@1207 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 367ce0ce923d4efe114f65300d2f4668cf7fbd4d 1 parent f3d1f39
Georg Bauer authored
Showing with 7 additions and 0 deletions.
  1. +7 −0 django/core/template/__init__.py
View
7 django/core/template/__init__.py
@@ -301,6 +301,13 @@ def value(self):
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'):
Please sign in to comment.
Something went wrong with that request. Please try again.