Categories:
Author:
About It:
Get it:
Rate it:
Flag it:
If you'd like to provide updated information and do not have access to directly edit, please contact the site admin; thanks!
Serve your site as application/xhtml+xml
If you want to serve your Textpattern site with the proper MIME type, you need to edit publish.php
, found in the /textpattern/ directory. (written for 4.0.3)
- Backup and open /textpattern/publish.php in a text editor
- Search for “text/html” (lines 115 and 439)
- Replace
header("Content-type: text/html; charset=utf-8");
with Mark Pilgrim’s code
if ( stristr($_SERVER["HTTP_ACCEPT"],"application/xhtml+xml") ) {
header("content-type: application/xhtml+xml; charset=utf-8");
}
else {
header("content-type: text/html; charset=utf-8");
}
You can also download a new publish.php version too.
Posted here:
02 Jul 2006