diff options
| author | Baptiste Mispelon <bmispelon@gmail.com> | 2013-02-25 22:53:14 +0100 |
|---|---|---|
| committer | Baptiste Mispelon <bmispelon@gmail.com> | 2013-03-07 19:30:38 +0100 |
| commit | 81804ae474d6fe5d3ab9348cfe86ee3779473a2a (patch) | |
| tree | f64da4fc70cf96abfa43513b0cf134fca14bb965 /django | |
| parent | 4cccb85e292fea01b3459cd97d751ed35179a7b7 (diff) | |
Fix 19916. Smarter tokenizing of contrib.comment's templatetags arguments.
Diffstat (limited to 'django')
| -rw-r--r-- | django/contrib/comments/templatetags/comments.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/django/contrib/comments/templatetags/comments.py b/django/contrib/comments/templatetags/comments.py index 4d4eb2322f..b5266d9bb3 100644 --- a/django/contrib/comments/templatetags/comments.py +++ b/django/contrib/comments/templatetags/comments.py @@ -17,7 +17,7 @@ class BaseCommentNode(template.Node): @classmethod def handle_token(cls, parser, token): """Class method to parse get_comment_list/count/form and return a Node.""" - tokens = token.contents.split() + tokens = token.split_contents() if tokens[1] != 'for': raise template.TemplateSyntaxError("Second argument in %r tag must be 'for'" % tokens[0]) @@ -146,7 +146,7 @@ class RenderCommentFormNode(CommentFormNode): @classmethod def handle_token(cls, parser, token): """Class method to parse render_comment_form and return a Node.""" - tokens = token.contents.split() + tokens = token.split_contents() if tokens[1] != 'for': raise template.TemplateSyntaxError("Second argument in %r tag must be 'for'" % tokens[0]) @@ -182,7 +182,7 @@ class RenderCommentListNode(CommentListNode): @classmethod def handle_token(cls, parser, token): """Class method to parse render_comment_list and return a Node.""" - tokens = token.contents.split() + tokens = token.split_contents() if tokens[1] != 'for': raise template.TemplateSyntaxError("Second argument in %r tag must be 'for'" % tokens[0]) |
