summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2007-07-16 04:54:49 +0000
committerMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2007-07-16 04:54:49 +0000
commit29891add3d23892f7dd1221d47f15d7455b5926b (patch)
tree176fe00ff0093bb3da7487534ee3231b2c5f0cde
parent58096c4bcc25ed4047866dbb333f4ae9f819944d (diff)
Fixed #4887 -- Fixed another place where template tag arguments are used
directly as function keyword args. Thanks, Brian Rosner. git-svn-id: http://code.djangoproject.com/svn/django/trunk@5715 bcc190cf-cafb-0310-a4f2-bffc1f526a37
-rw-r--r--AUTHORS1
-rw-r--r--django/contrib/comments/templatetags/comments.py2
2 files changed, 3 insertions, 0 deletions
diff --git a/AUTHORS b/AUTHORS
index 63b88b625b..69a0dfb3d9 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -222,6 +222,7 @@ answer newbie questions, and generally made Django that much better:
rhettg@gmail.com
Henrique Romano <onaiort@gmail.com>
Armin Ronacher
+ Brian Rosner <brosner@gmail.com>
Oliver Rutherfurd <http://rutherfurd.net/>
Ivan Sagalaev (Maniac) <http://www.softwaremaniacs.org/>
Vinay Sajip <vinay_sajip@yahoo.co.uk>
diff --git a/django/contrib/comments/templatetags/comments.py b/django/contrib/comments/templatetags/comments.py
index 5c02c16f95..756ab9c93b 100644
--- a/django/contrib/comments/templatetags/comments.py
+++ b/django/contrib/comments/templatetags/comments.py
@@ -5,6 +5,7 @@ from django import template
from django.template import loader
from django.core.exceptions import ObjectDoesNotExist
from django.contrib.contenttypes.models import ContentType
+from django.utils.encoding import smart_str
import re
register = template.Library()
@@ -174,6 +175,7 @@ class DoCommentForm:
if tokens[4] != 'with':
raise template.TemplateSyntaxError, "Fourth argument in %r tag must be 'with'" % tokens[0]
for option, args in zip(tokens[5::2], tokens[6::2]):
+ option = smart_str(option)
if option in ('photos_optional', 'photos_required') and not self.free:
# VALIDATION ##############################################
option_list = args.split(',')