Ticket #693 (fixed enhancement)
Serve content with XHTML content type
- Created: 2012-07-07 18:48:41
- Reported by: jacob
- Assigned to: quy
- Milestone: 1.5.1
- Component: markup
- Priority: normal
Currently, FluxBB is served with the "text/html; charset=utf-8" Content-type header.
Since it uses XHTML, it should be served with "application/xhtml+xml; charset=utf-8".
History

- Status changed from fixed to open.
This prevents the site from loading in IE6. IE wants to download the page. Should this be reverted in v1.5 and save for v2.0?

There are hacks, but I have not thoroughly investigated to know for sure.
Hopefully, Jacob or Paul can chime in on this.
jacob 2012-10-09 22:44:05

What could be done is checking the HTTP_USER_AGENT, and if it's IE6 or earlier, then serve it with text/html instead.
adaur 2012-10-10 13:45:43

All hacks I've seen are quite dirty. The best is maybe this one: http://www.nicolas-hoffmann.net/source/ … et-IE.html
Pure PHP, no extra HTML code required.
Otherwise, this is not a very big deal...
Franz 2012-10-10 14:27:10

That looks better than browser sniffing in my eyes.
By the way: should we add that XML snippet if we serve XHTML?
JohnLewis 2012-10-17 17:10:20

Quy, Since Yannick believes this is fixed and you don't, Then in my opinion, I think you should take it and fix it.
Koos 2012-11-27 22:25:17

This change is causing some problems in Firefox. Any element not adhering to xhtml will generate a XML Parsing Error in the browser. Many mods are affected by this.
Franz 2012-11-27 22:28:26

Indeed. Gosh, this was a horrible release. Everything is going wrong. Looks like a quick 1.5.2 is necessary, as much as I hate it.
@quy: Would you think it makes sense to revert this change? Too many integrations and mods breaking...

I do. In hindsight, this was a drastic change when releases in v1.5 branch should be for bug fixes, security, etc. I am not familiar enough with Git to revert this commit. Can you do it? Thanks.
macgroover 2012-12-11 19:30:48

Since it uses XHTML, it should be served with "application/xhtml+xml; charset=utf-8".
Sorry but this is wrong. There's a reason that the XHTML experiment was abandoned in favour of HTML5. XML parsers are *required* to display an error and die should there be any error in the XML. That means that an plugin that does not render perfect XML without exception or the slightest bug with a & symbol will display an error message. Sure use clean HTML, but there is no need to make it XML. HTML5 is designed that it can be written either way.