and Tags to Htmlentities.
foreach($this->nodesToConvert as $node)
{
$value = $node->C14N();
$value = str_replace("
","",$value);
if($node->nodeName == 'pre')
{
$value = substr($value,5);
$end = strrpos($value,"
");
$value = substr($value,0,$end);
}
if($node->nodeName == 'code')
{
$value = substr($value,6);
$end = strrpos($value,"
");
$value = substr($value,0,$end);
}
$value = htmlentities(htmlentities($value)); // Needed
$node->nodeValue = $value;
}
$cleaned = $doc->saveHTML();
$cleaned = str_replace(array('','','','','','