1
0

allowing to cleanup attributes as well

This commit is contained in:
Roland Angerer
2013-06-21 13:40:27 +02:00
parent 65cb3066d2
commit 067c94e671

View File

@ -121,7 +121,12 @@ class Af_Feedmod extends Plugin implements IHandler
foreach ($config['cleanup'] as $cleanup) {
$nodelist = $xpath->query('//'.$cleanup, $basenode);
foreach ($nodelist as $node) {
$node->parentNode->removeChild($node);
if ($node instanceof DOMAttr) {
$node->ownerElement->removeAttributeNode($node);
}
else {
$node->parentNode->removeChild($node);
}
}
}
}