Fork me on GitHub
Subscribe 8

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".


jacob 2012-07-07 18:50:23

  • Type changed from bug to enhancement.

Franz 2012-07-07 19:29:18

  • Milestone set to 1.5.1.

Thanks for the report!

Studio384 2012-09-11 20:22:07

  • Owner set to Studio384.

Studio384 2012-09-12 05:46:20

If I'm right, this code is only given in the templates, right?

Studio384 2012-09-12 11:49:15

Commit 82bd40e to fluxbb master

#693: Fixed content type

Oldskool 2012-09-12 12:01:20

Commit 3f63c25 to fluxbb master

Merge pull request #48 from Studio384/master

#693: Fix for content type

Studio384 2012-09-12 12:05:41

  • Status changed from open to fixed.

And this is fixed.

quy 2012-10-09 18:33:30

  • 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?

Franz 2012-10-09 21:51:17

If this is a general problem with IE6 and cannot be fixed, certainly.

quy 2012-10-09 22:38:01

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.

Franz 2012-10-09 23:17:36

Bah, far too complicated.

jacob 2012-10-10 00:43:04

It's not that hard. I could do it easily, and will later on.

adaur 2012-10-10 13:45:43

All hacks I've seen are quite dirty. The best is maybe this one: … 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?

jacob 2012-10-10 14:29:34

According to Wikipedia, you don't need to.

quy 2012-10-17 17:02:15

Studio384: I can take care of this if you don't have the time.

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.

Studio384 2012-10-18 04:58:43

  • Owner changed from Studio384 to quy.

quy 2012-10-18 18:54:37

Commit 35e3df9 to fluxbb master

#693: Add function to serve XHTML with the correct MIME type

quy 2012-10-18 18:57:06

  • Status changed from open to fixed.

Thanks adaur for the link.

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.

Comment edited 1 times (Diff)

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...

quy 2012-11-27 22:39:36

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.

Franz 2012-11-27 22:53:33

I will.

Studio384 2012-12-02 17:51:49

Commit ac88779 to fluxbb master

#777: revert #693, back to text/html

Franz 2012-12-03 00:19:50

Commit 4490ede to fluxbb master

Merge pull request #61 from Studio384/master

#777: revert #693, back to text/html

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.

Franz 2012-12-11 20:15:08

Yes, that's why we reverted this change in the current development code.