Opened 17 years ago

Closed 17 years ago

#4527 closed (fixed)

Form.as_p produces invalid XHTML for rows with errors

Reported by: Chris Beaven Owned by: Adrian Holovaty
Component: Forms Version: dev
Severity: Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


<p><ul class="errorlist"><li>This field is required.</li></ul></p>
<p>Last name: <input type="text" name="lname" maxlength="30" /></p>

<p> elements can only contain inline and "text-level" elements (DTD).

Easy fix attached.

Attachments (1)

as_p.diff (618 bytes ) - added by Chris Beaven 17 years ago.

Download all attachments as: .zip

Change History (4)

by Chris Beaven, 17 years ago

Attachment: as_p.diff added

comment:1 by Chris Beaven, 17 years ago

Triage Stage: UnreviewedReady for checkin

comment:2 by Malcolm Tredinnick, 17 years ago

I'm slightly in two minds about whether this is the right fix, or whether we should be changing the way errors are rendered (so that they aren't HTML lists in this case). The latter change is a lot more intrusive and these are helper methods anyway, so I've gone with the patch from Chris, but it may not be universally loved.

comment:3 by Malcolm Tredinnick, 17 years ago

Resolution: fixed
Status: newclosed

(In [5518]) Fixed #4527 -- Changed the way errors are displayed in Form.as_p() to avoid
invalid XHTML constructs. Based on a patch from SmileyChris.

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