Opened 14 years ago

Closed 14 years ago

Last modified 13 years ago

#14984 closed (fixed)

ClearableFileInput generates invalid XHTML

Reported by: Luke Plant Owned by: elbarto
Component: Forms Version: 1.2
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

Description

The 'target' attribute of anchors does not exist in XHTML Strict, making admin pages with the ClearableFileInput widget produce invalid XHTML.

I do not propose fixing this yet, because the 'target' attribute is valid in HTML5, and its usefulness outweighs the fact that it is technically invalid XHTML. I'm just noting it, mainly as a reason we should think about moving to HTML5.

Attachments (1)

patch.diff (620 bytes ) - added by elbarto 14 years ago.

Download all attachments as: .zip

Change History (8)

comment:1 by Gabriel Hurley, 14 years ago

Triage Stage: UnreviewedAccepted

While it's true that the target attribute is valid HTML5, that's not the standard we've been complying to thus far. Looking at the source, it doesn't look like the target="_blank" is providing any critical functionality, merely an added nicety. I'm not personally affected by 100% XHTML4 compliance, but I know that some people are. As such it seems to me that it ought to be removed on principle until Django officially support either HTML5 or configurable doctype output options.

I don't feel strongly, however. Marking as accepted.

comment:2 by elbarto, 14 years ago

Owner: changed from nobody to elbarto

by elbarto, 14 years ago

Attachment: patch.diff added

comment:3 by elbarto, 14 years ago

Has patch: set

comment:4 by Jannis Leidel, 14 years ago

milestone: 1.3
Triage Stage: AcceptedReady for checkin

comment:5 by Russell Keith-Magee, 14 years ago

Resolution: fixed
Status: newclosed

In [15426]:

Fixed #14984 -- Ensure that ClearableFileInput produces XHTML Strict output. Thanks to Luke for the report.

comment:6 by Ramiro Morales, 14 years ago

In [15432]:

Modified wrong expected ClearableFileInput rendering output in a couple of additional tests after fix introduced in [15426]. Refs #14984.

comment:7 by Jacob, 13 years ago

milestone: 1.3

Milestone 1.3 deleted

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