Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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
  • Loading branch information
malcolmt committed Oct 4, 2007
1 parent 3c18331 commit 4d8561a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions django/oldforms/__init__.py
Expand Up @@ -500,7 +500,7 @@ def render(self, data):
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)

Expand Down Expand Up @@ -612,7 +612,7 @@ def render(self, data):
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)

Expand Down

0 comments on commit 4d8561a

Please sign in to comment.