Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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...
commit 4d8561a8a8f802f6874979d72eb7facbe20b5f09 1 parent 3c18331
Malcolm Tredinnick authored October 04, 2007

Showing 1 changed file with 2 additions and 2 deletions. Show diff stats Hide diff stats

  1. 4  django/oldforms/__init__.py
4  django/oldforms/__init__.py
@@ -500,7 +500,7 @@ def render(self, data):
500 500
             selected_html = u''
501 501
             if smart_unicode(value) == str_data:
502 502
                 selected_html = u' selected="selected"'
503  
-            output.append(u'    <option value="%s"%s>%s</option>' % (escape(value), selected_html, escape(display_name)))
  503
+            output.append(u'    <option value="%s"%s>%s</option>' % (escape(value), selected_html, force_unicode(escape(display_name))))
504 504
         output.append(u'  </select>')
505 505
         return u'\n'.join(output)
506 506
 
@@ -612,7 +612,7 @@ def render(self, data):
612 612
             selected_html = u''
613 613
             if smart_unicode(value) in str_data_list:
614 614
                 selected_html = u' selected="selected"'
615  
-            output.append(u'    <option value="%s"%s>%s</option>' % (escape(value), selected_html, escape(choice)))
  615
+            output.append(u'    <option value="%s"%s>%s</option>' % (escape(value), selected_html, force_unicode(escape(choice))))
616 616
         output.append(u'  </select>')
617 617
         return u'\n'.join(output)
618 618
 

0 notes on commit 4d8561a

Please sign in to comment.
Something went wrong with that request. Please try again.