How to deliver HTML instead of XHTML with WordPress
Have you ever had the need/wish for WordPress to deliver HTML instead of XHTML in your blog? And if yes, then having no idea how to control the default XHTML tags generated in comments and its likes? Fret no more!
Insert this code at the top of your header file (that I take for granted is included in all of your web site’s pages):
<?php
// Transforming XHTML into HTML
function xml2html($buffer)
{
$xml = array(' />');
$html = array('>');
return str_replace($xml, $html, $buffer);
}
ob_start('xml2html');
?>
This fix is taken (and just slightly modified and trimmed down for this purpose) from Tommy Olsson’s Content Negotiation post.


