Opened 6 years ago

Closed 6 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:


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

Attachments (1)

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

Download all attachments as: .zip

Change History (4)

Changed 6 years ago by nkilday

comment:1 Changed 6 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),

comment:2 Changed 6 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 6 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.

Add Comment

Modify Ticket

Change Properties
<Author field>
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.