Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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
authored November 12, 2005

Showing 1 changed file with 7 additions and 0 deletions. Show diff stats Hide diff stats

  1. 7  django/core/template/__init__.py
7  django/core/template/__init__.py
@@ -301,6 +301,13 @@ def value(self):
301 301
         else:
302 302
             p = i
303 303
             while i < len(subject) and subject[i] not in (' ', '\t'):
  304
+                if subject[i] in ('"', "'"):
  305
+                    c = subject[i]
  306
+                    i += 1
  307
+                    while i < len(subject) and subject[i] != c:
  308
+                        i += 1
  309
+                    if i >= len(subject):
  310
+                        raise TemplateSyntaxError, "Searching for value. Unexpected end of string in column %d: %s" % subject
304 311
                 i += 1
305 312
             s = subject[p:i]
306 313
             while i < len(subject) and subject[i] in (' ', '\t'):

0 notes on commit 367ce0c

Please sign in to comment.
Something went wrong with that request. Please try again.