How to minify php html output without removing IE conditional comments?
<p>I minify my HTML pages whit this PHP script:</p>

<pre><code>function compress_html($html)
{
    preg_match_all('!(&lt;(?:code|pre|script).*&gt;[^&lt;]+&lt;/(?:code|pre|script)&gt;)!', $html, $pre);
    $html = preg_replace('!&lt;(?:code|pre).*&gt;[^&lt;]+&lt;/(?:code|pre)&gt;!', '#pre#', $html);
    $html = preg_replace('#&lt;!–[^\[].+–&gt;#', '', $html);
    $html = preg_replace('/[\r\n\t]+/', ' ', $html);
    $html = preg_replace('/&gt;[\s]+&lt;/', '&gt;&lt;', $html);
    $html = preg_replace('/\s+/', ' ', $html);

    if (!empty($pre[0])) {
        foreach ($pre[0] as $tag) {
        $html = preg_replace('!#pre#!', $tag, $html,1);
        }
    }
    return $html;
}

ob_start('compress_html');
</code></pre>

<p>There is a way to remove just the "HTML comments"...and not the IE conditional comments?</p>

<p>Thanks.</p>
