diff --git a/library/HTMLPurifier/HTMLDefinition.php b/library/HTMLPurifier/HTMLDefinition.php
index 7632bfc1..8914ad70 100644
--- a/library/HTMLPurifier/HTMLDefinition.php
+++ b/library/HTMLPurifier/HTMLDefinition.php
@@ -397,6 +397,13 @@ class HTMLPurifier_HTMLDefinition
$this->info_attr_transform_post[] = new HTMLPurifier_AttrTransform_Lang();
+ // protect against stdclasses floating around
+ foreach ($this->info as $key => $obj) {
+ if (is_a($obj, 'stdclass')) {
+ unset($this->info[$key]);
+ }
+ }
+
}
function setAttrForTableElements($attr, $def) {