Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

XHTML to HTML

Name: Anonymous 2007-03-17 22:26 ID:mmTvIK73

I'm currently working on a load of PHP to make my website show as XHTML with an application/xhtml+xml content-type to non-shitty browsers (Firefox, Opera, Safari) and as HTML with a text/html content-type to shitty browsers (Internet Explorer).

At this point I'm mostly done, but I've got one more minor issue that I want fix.

The code in both versions of the page has trailing slashes in some tags as is correct for XHTML, but I want to change that in the HTML version so "<br />"  becomes "<br>".

This is a very minor thing, but I'm fairly certain it can be done in PHP and would to do so.

Name: Anonymous 2007-03-17 23:13 ID:yT9DFLan

I don't understand why you'd want to do that. IE ignores standards and just does whatever the fuck it feels like doing, and you go out of your way to send it something that both renders correctly and validates?

Standards exist so that multiple applications can work with the same data. Since you're only sending out your data to IE, there's no reason to use standards.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List