summaryrefslogtreecommitdiff
path: root/init.php
diff options
context:
space:
mode:
authorRoland Angerer <dev@rangerer.at>2013-06-21 13:40:27 +0200
committerRoland Angerer <dev@rangerer.at>2013-06-21 13:40:27 +0200
commit067c94e671a29d5e369e0f330da89b77b4c6ac73 (patch)
treedaaa143d72141df498cfb863c2481969480835f8 /init.php
parent65cb3066d277e7650d71e1b561b5c91be1d8ea57 (diff)
downloadyafpp-067c94e671a29d5e369e0f330da89b77b4c6ac73.tar.gz
yafpp-067c94e671a29d5e369e0f330da89b77b4c6ac73.zip
allowing to cleanup attributes as well
Diffstat (limited to 'init.php')
-rw-r--r--init.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/init.php b/init.php
index e99744a..d83110e 100644
--- a/init.php
+++ b/init.php
@@ -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);
+ }
}
}
}