diff options
| author | Aymeric Augustin <aymeric.augustin@m4x.org> | 2013-03-07 12:12:29 -0800 |
|---|---|---|
| committer | Aymeric Augustin <aymeric.augustin@m4x.org> | 2013-03-07 12:12:29 -0800 |
| commit | 477d737e1e6bdf93950c8a381906925c594fac2f (patch) | |
| tree | 75fba781c6e864a7f062b34f4f7314f0be0fc19e /django | |
| parent | 1b81f328f4fb74d35a8397385fbc18aef03ac297 (diff) | |
| parent | 81804ae474d6fe5d3ab9348cfe86ee3779473a2a (diff) | |
Merge pull request #850 from bmispelon/ticket-19916
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]) |
