MDL-24810 importing latest HTMLPurifier - already tested in HEAD for some time

This commit is contained in:
Petr Skoda
2010-10-22 14:46:59 +00:00
parent 9551b113bc
commit 71d49c63c4
29 changed files with 234 additions and 65 deletions
@@ -300,7 +300,12 @@ class HTMLPurifier_HTMLDefinition extends HTMLPurifier_Definition
unset($allowed_attributes_mutable[$key]);
}
}
if ($delete) unset($this->info[$tag]->attr[$attr]);
if ($delete) {
if ($this->info[$tag]->attr[$attr]->required) {
trigger_error("Required attribute '$attr' in element '$tag' was not allowed, which means '$tag' will not be allowed either", E_USER_WARNING);
}
unset($this->info[$tag]->attr[$attr]);
}
}
}
// emit errors