Index: django/newforms/forms.py
===================================================================
--- django/newforms/forms.py (revision 4940)
+++ django/newforms/forms.py (working copy)
@@ -4,7 +4,7 @@
from django.utils.datastructures import SortedDict, MultiValueDict
from django.utils.html import escape
-from django.utils.encoding import StrAndUnicode
+from django.utils.encoding import StrAndUnicode, smart_unicode
from fields import Field
from widgets import TextInput, Textarea, HiddenInput, MultipleHiddenInput
from util import flatatt, ErrorDict, ErrorList, ValidationError
@@ -127,7 +127,7 @@
help_text = help_text_html % field.help_text
else:
help_text = u''
- output.append(normal_row % {'errors': bf_errors, 'label': label, 'field': unicode(bf), 'help_text': help_text})
+ output.append(normal_row % {'errors': bf_errors, 'label': smart_unicode(label), 'field': unicode(bf), 'help_text': help_text})
if top_errors:
output.insert(0, error_row % top_errors)
if hidden_fields: # Insert any hidden fields in the last row.
Index: django/newforms/widgets.py
===================================================================
--- django/newforms/widgets.py (revision 4940)
+++ django/newforms/widgets.py (working copy)
@@ -162,7 +162,7 @@
for option_value, option_label in chain(self.choices, choices):
option_value = smart_unicode(option_value)
selected_html = (option_value == str_value) and u' selected="selected"' or ''
- output.append(u'' % (escape(option_value), selected_html, escape(smart_unicode(option_label))))
+ output.append(u'' % (escape(option_value), selected_html, smart_unicode(escape(option_label))))
output.append(u'')
return u'\n'.join(output)