Django

Code

Ticket #4527 (closed: fixed)

Opened 1 year ago

Last modified 1 year ago

Form.as_p produces invalid XHTML for rows with errors

Reported by: SmileyChris Assigned to: adrian
Milestone: Component: Forms
Version: SVN Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: 1 Needs documentation: 0
Needs tests: 0 Patch needs improvement: 0

Description

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

as_p.diff (0.6 kB) - added by SmileyChris on 06/11/07 00:25:23.

Change History

06/11/07 00:25:23 changed by SmileyChris

  • attachment as_p.diff added.

06/20/07 23:29:56 changed by SmileyChris

  • needs_better_patch changed.
  • stage changed from Unreviewed to Ready for checkin.
  • needs_tests changed.
  • needs_docs changed.

06/23/07 01:07:05 changed by mtredinnick

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.

06/23/07 01:19:26 changed by mtredinnick

  • status changed from new to closed.
  • resolution set to fixed.

(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?.


Add/Change #4527 (Form.as_p produces invalid XHTML for rows with errors)




Change Properties
Action