diff options
author | Georg Bauer <gb@hugo.westfalen.de> | 2005-11-12 21:45:01 +0000 |
---|---|---|
committer | Georg Bauer <gb@hugo.westfalen.de> | 2005-11-12 21:45:01 +0000 |
commit | 367ce0ce923d4efe114f65300d2f4668cf7fbd4d (patch) | |
tree | 452f05f59c11eb9020c42b58f659c013d941d154 | |
parent | f3d1f395592a9f8dc143c471dbdc111b5247a03e (diff) | |
download | django-367ce0ce923d4efe114f65300d2f4668cf7fbd4d.tar.gz |
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
-rw-r--r-- | django/core/template/__init__.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/django/core/template/__init__.py b/django/core/template/__init__.py index a501d6bbe8..c007e4bc80 100644 --- a/django/core/template/__init__.py +++ b/django/core/template/__init__.py @@ -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'): |