Opened 3 years ago

Closed 3 years ago

#29681 closed Cleanup/optimization (wontfix)

Support XHTML5 (XML serialization of HTML5)

Reported by: Nils Fredrik Gjerull Owned by: nobody
Component: Forms Version: 2.1
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Frameworks and libraries that generate html should output well-formed html that can be used for both HTML serialization (text/html) and XML serialization (application/xhtml+xml). This implies that Django should continue to output XML compatible markup even for HTML5.

This do not mean that Django need to be restricted by the XHTML-Transitional and XHTML-Strict standard. It only means that HTML5 needs to be written in a XML compatible style.

This affects Django in three ways:

  1. HTML must be well-formed. All start-tags needs an end-tag (except self-closing tags). This is already the case.
  2. All self-closing tags must end with '/>'.
  3. All boolean attributes must have a value e.g 'checked="checked"'.

I will say that this time is the best time ever to serve pages with application/xhtml+xml, because all browsers supports it. IE was the road blocker for year, but since IE9 it supports it as well. Se a list of the default value of the Accept header for various browsers from Mozilla.

See:

Change History (1)

comment:1 Changed 3 years ago by Tim Graham

Resolution: wontfix
Status: newclosed
Type: UncategorizedCleanup/optimization

The django-developers discussion hasn't yielded a consensus to make this change. As I said on the mailing list, please look into custom widget templates for this.

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