I use xpath to remove <p> </p>
$nodeList = $xpath->query("//p[text()=\"\xC2\xA0\"]"); #
foreach($nodeList as $node)
{
$node->parentNode->removeChild($node);
}
but it does not remove this,
<p><strong><br /> </strong></p>
or this kind,
<p><strong> </strong></p>
How can I remove them?
Or maybe a regex that I should use?
Try with
Quoting from the docs