Opened 7 years ago

Closed 7 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: UI/UX:

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 7 years ago.

Download all attachments as: .zip

Change History (4)

Changed 7 years ago by nkilday

comment:1 Changed 7 years ago by nkilday

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

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 Changed 7 years ago by mtredinnick

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 Changed 7 years ago by mtredinnick

  • Resolution set to fixed
  • Status changed from new to closed

(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