summaryrefslogtreecommitdiff
path: root/django/forms
diff options
context:
space:
mode:
authorMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2008-08-31 11:39:06 +0000
committerMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2008-08-31 11:39:06 +0000
commit24bacb19dea298943f54155f911df380c73f9ea2 (patch)
treecb8a7cd108f6eec1eb0294fe105c6a0c65d482f8 /django/forms
parenta63a83e5d88cd1696d1c40e89f254f69116c6800 (diff)
Fixed #5216 -- Fixed a case of a string not being a unicode string.
Thanks to Vadim Fint for the test case. git-svn-id: http://code.djangoproject.com/svn/django/trunk@8761 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/forms')
-rw-r--r--django/forms/forms.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/django/forms/forms.py b/django/forms/forms.py
index 753ee254bc..7d1254c5ea 100644
--- a/django/forms/forms.py
+++ b/django/forms/forms.py
@@ -374,7 +374,7 @@ class BoundField(StrAndUnicode):
id_ = widget.attrs.get('id') or self.auto_id
if id_:
attrs = attrs and flatatt(attrs) or ''
- contents = '<label for="%s"%s>%s</label>' % (widget.id_for_label(id_), attrs, contents)
+ contents = u'<label for="%s"%s>%s</label>' % (widget.id_for_label(id_), attrs, unicode(contents))
return mark_safe(contents)
def _is_hidden(self):