Opened 16 years ago

Closed 16 years ago

#9294 closed (fixed)

TextArea widget calls force_unicode 2x on render

Reported by: nkilday Owned by: nobody
Component: Forms Version: 1.0
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

django.forms.widgets.TextArea.render calls "force_unicode" on the value argument twice.

Attachments (1)

ticket-9294_patch.diff (496 bytes ) - added by nkilday 16 years ago.

Download all attachments as: .zip

Change History (4)

by nkilday, 16 years ago

Attachment: ticket-9294_patch.diff added

comment:1 by nkilday, 16 years ago

The render function does this:

value = force_unicode(value) 

Then it calls force_unicode again on value:

return mark_safe(u'<textarea%s>%s</textarea>' % (flatatt(final_attrs),
                conditional_escape(force_unicode(value))))

comment:2 by Malcolm Tredinnick, 16 years ago

Next time, please create the patch from the top of the source tree so that we can easily see which file is being patched in the patch itself.

comment:3 by Malcolm Tredinnick, 16 years ago

Resolution: fixed
Status: newclosed

(In [9145]) Fixed #9294 -- Removed a (harmless) double conversion to unicode in one form
widget. Patch from nkilday.

Note: See TracTickets for help on using tickets.
Back to Top