Opened 7 years ago

Closed 7 years ago

#6036 closed (duplicate)

MultiWidget's render method does not "mark_safe" the HTML it returns

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

Description

MultiWidget needs to call the "mark_safe" function on the HTML output before returning or it will not render correctly.

To reproduce the bug:

  1. Create a form with the field:

forms.SplitDateTimeField(widget=forms.SplitDateTimeWidget)

  1. Create a template where you explicitly position the form fields, ie. {{ form.start_datetime.label_tag }} {{ form.start_datetime }} . Do not use as_table or any of the other short cuts.

Attachments (1)

multiwidget_render_fix.diff (586 bytes) - added by dtulig 7 years ago.

Download all attachments as: .zip

Change History (3)

Changed 7 years ago by dtulig

comment:1 Changed 7 years ago by dtulig

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Status changed from new to assigned

comment:2 Changed 7 years ago by SmileyChris

  • Resolution set to duplicate
  • Status changed from assigned to closed

Thanks dtulig. I was triaging in reverse and came across #6113 first so I'll dupe as that.

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