diff options
| author | Malcolm Tredinnick <malcolm.tredinnick@gmail.com> | 2007-10-04 01:54:58 +0000 |
|---|---|---|
| committer | Malcolm Tredinnick <malcolm.tredinnick@gmail.com> | 2007-10-04 01:54:58 +0000 |
| commit | 4d8561a8a8f802f6874979d72eb7facbe20b5f09 (patch) | |
| tree | 83fc98236a3fcaeec0541cc87d2e8aa99092da55 | |
| parent | 3c18331adc1fc45c9fec59991c1689cf751790e8 (diff) | |
Fixed a Python 2.3 Unicode + oldforms problem. Refs #5287.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6452 bcc190cf-cafb-0310-a4f2-bffc1f526a37
| -rw-r--r-- | django/oldforms/__init__.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/django/oldforms/__init__.py b/django/oldforms/__init__.py index 9bb90416c4..5f7b9fc2ad 100644 --- a/django/oldforms/__init__.py +++ b/django/oldforms/__init__.py @@ -500,7 +500,7 @@ class SelectField(FormField): selected_html = u'' if smart_unicode(value) == str_data: selected_html = u' selected="selected"' - output.append(u' <option value="%s"%s>%s</option>' % (escape(value), selected_html, escape(display_name))) + output.append(u' <option value="%s"%s>%s</option>' % (escape(value), selected_html, force_unicode(escape(display_name)))) output.append(u' </select>') return u'\n'.join(output) @@ -612,7 +612,7 @@ class SelectMultipleField(SelectField): selected_html = u'' if smart_unicode(value) in str_data_list: selected_html = u' selected="selected"' - output.append(u' <option value="%s"%s>%s</option>' % (escape(value), selected_html, escape(choice))) + output.append(u' <option value="%s"%s>%s</option>' % (escape(value), selected_html, force_unicode(escape(choice)))) output.append(u' </select>') return u'\n'.join(output) |
