Opened 8 years ago

Closed 8 years ago

Last modified 7 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


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 8 years ago.

Download all attachments as: .zip

Change History (8)

comment:1 Changed 8 years ago by Gabriel Hurley

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 Changed 8 years ago by elbarto

Owner: changed from nobody to elbarto

Changed 8 years ago by elbarto

Attachment: patch.diff added

comment:3 Changed 8 years ago by elbarto

Has patch: set

comment:4 Changed 8 years ago by Jannis Leidel

milestone: 1.3
Triage Stage: AcceptedReady for checkin

comment:5 Changed 8 years ago by Russell Keith-Magee

Resolution: fixed
Status: newclosed

In [15426]:

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

comment:6 Changed 8 years ago by Ramiro Morales

In [15432]:

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

comment:7 Changed 7 years ago by Jacob

milestone: 1.3

Milestone 1.3 deleted

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