MDL-19183 imported HTMLpurifier 3.3.0

This commit is contained in:
skodak
2009-05-14 08:31:11 +00:00
parent 1cc9acedbe
commit 63e6a80976
324 changed files with 3017 additions and 2561 deletions
@@ -8,10 +8,10 @@ class HTMLPurifier_Injector_SafeObject extends HTMLPurifier_Injector
{
public $name = 'SafeObject';
public $needed = array('object', 'param');
protected $objectStack = array();
protected $paramStack = array();
// Keep this synchronized with AttrTransform/SafeParam.php
protected $addParam = array(
'allowScriptAccess' => 'never',
@@ -21,11 +21,11 @@ class HTMLPurifier_Injector_SafeObject extends HTMLPurifier_Injector
'wmode' => true,
'movie' => true,
);
public function prepare($config, $context) {
parent::prepare($config, $context);
}
public function handleElement(&$token) {
if ($token->name == 'object') {
$this->objectStack[] = $token;
@@ -71,7 +71,7 @@ class HTMLPurifier_Injector_SafeObject extends HTMLPurifier_Injector
}
}
}
public function handleEnd(&$token) {
// This is the WRONG way of handling the object and param stacks;
// we should be inserting them directly on the relevant object tokens
@@ -81,6 +81,7 @@ class HTMLPurifier_Injector_SafeObject extends HTMLPurifier_Injector
array_pop($this->paramStack);
}
}
}
// vim: et sw=4 sts=4