Make WordPress Core

Opened 7 years ago

Closed 6 years ago

#3764 closed enhancement (invalid)

Selectable Output

Reported by: tandilboy Owned by:
Milestone: Priority: low
Severity: normal Version: 2.2
Component: General Keywords:
Focuses: Cc:


a good idea is add an Output Selector (HTML or XHTML) for better template customization

Change History (6)

comment:1 JeremyVisser7 years ago

I'm a little edgy on this one. XHTML is the future of HTML, and is well-supported enough in older browsers; it seems pointless to be to go backwards.

If this were an option, this would be added in the theme code, not as a user-selectable option in the WordPress Administration.

comment:2 foolswisdom7 years ago

  • Milestone changed from 2.2 to 2.3

comment:3 tombarta7 years ago

If you want to embed MathML or SVG into an XHTML document (at least to Firefox), you have to serve it up with a different Content-Type. Because of the XML parsing, this will break if plugins or themes produce invalid markup. Legacy HTML support (ideally 4.01 strict, but resiliant to errors) should still be provided alongside strict XML support if you really want to get the best of both worlds.

Alternatively, this could be addressed from the other direction by applying something like Tidy to convert malformed markup. Maybe as a user-controlled setting along the lines of: "Force XHTML output? Warning: this may break badly-malformed content." Or as Jeremy says, it could be automated: plugins/themes indicate whether or not they require HTML or XHTML formatting to function, and wordpress core verifies that everything matches.

comment:4 ryan7 years ago

By the way, html_type is a hidden option that can be changed to whatever content type you like.


comment:5 foolswisdom7 years ago

  • Milestone changed from 2.3 to 2.5 (future)

comment:6 pishmishy6 years ago

  • Milestone 2.6 deleted
  • Resolution set to invalid
  • Status changed from new to closed

I'm not sure that this is something that'll ever be implemented so closing. I'm pretty sure that everyone accepts that WordPress outputs XHTML and will continue to work this way.

If plugins/themes are producing invalid markup - chase the plugin/theme author :-)

Note: See TracTickets for help on using tickets.