diff --git a/var/Typecho/Common.php b/var/Typecho/Common.php index 4c964c80..21ebd1ab 100644 --- a/var/Typecho/Common.php +++ b/var/Typecho/Common.php @@ -592,7 +592,7 @@ EOF; $attribute = $node->attributes->item($i); $name = strtolower($attribute->name); - if (!in_array($name, $allowableAttributes[$tagName])) { + if (empty($allowableAttributes[$tagName]) || !in_array($name, $allowableAttributes[$tagName])) { $node->removeAttributeNode($attribute); } }