Quote:
Originally Posted by Kristian
You're right. I need a better understanding of all of this. I'm not trying to do the XHTML hack on index.php - I don't know what it is. Perhaps it's this?
// Fix proposed by tomyeah on the forum
if (!isset($_GET['x']) || $_GET['x'] != 'save_comment') {
header('Vary: Accept');
if (stristr($_SERVER['HTTP_ACCEPT'], 'application/xhtml+xml') === FALSE) {
header('Content-Type: text/html; charset=utf-8');
} else {
header('Content-Type: application/xhtml+xml; charset=utf-8');
echo('<?xml version="1.0" encoding="UTF-8"?>'."\\n");
}
}
|
That is it. You can either remove it, replace it with the pixelpost default
PHP Code:
// Fix proposed by tomyeah on the forum
header('Content-Type: text/html; charset=utf-8');
or use what I use (which is for strict XHTML1.1 standards)
PHP Code:
if (empty($_GET['x']) || ($_GET['x'] != "save_comment" && $_GET['x'] != "rss" && $_GET['x'] != "atom")) {
header('Vary: Accept');
if (stristr($_SERVER['HTTP_ACCEPT'], 'application/xhtml+xml') === false)
{
header('Content-Type: text/html; charset=utf-8');
}
else {
header('Content-Type: application/xhtml+xml; charset=utf-8');
echo('<?xml version="1.0" encoding="UTF-8"?>'."\n");
}
}
The safest is to use the Pixelpost default, as the XHTML stuff might break other templates.