Quote:
Originally Posted by tempz
try this:
Code:
$('*').contents().each(function() {
if(this.nodeType == 8) {
$(this).remove()
}
});
|
The OP specifically emphasized wanting a
PHP solution.
This will strip all comments, but exclude thise that begin with
<!--[
PHP Code:
$html = preg_replace( '/\<\!\-\-[^\[].*\-\-\>/Us', '', $html );