mirror of
https://github.com/ezyang/htmlpurifier.git
synced 2024-11-10 15:48:42 +00:00
Fix creation of dynamic property (#337)
This commit is contained in:
parent
36e06603a8
commit
ce9cf2ec99
@ -4,10 +4,13 @@ class HTMLPurifier_Strategy_MakeWellFormed_EndRewindInjector extends HTMLPurifie
|
|||||||
{
|
{
|
||||||
public $name = 'EndRewindInjector';
|
public $name = 'EndRewindInjector';
|
||||||
public $needed = array('span');
|
public $needed = array('span');
|
||||||
|
private $deleteElement = false;
|
||||||
|
|
||||||
public function handleElement(&$token)
|
public function handleElement(&$token)
|
||||||
{
|
{
|
||||||
if (isset($token->_InjectorTest_EndRewindInjector_delete)) {
|
if ($this->deleteElement) {
|
||||||
$token = false;
|
$token = false;
|
||||||
|
$this->deleteElement = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public function handleText(&$token)
|
public function handleText(&$token)
|
||||||
@ -23,7 +26,7 @@ class HTMLPurifier_Strategy_MakeWellFormed_EndRewindInjector extends HTMLPurifie
|
|||||||
$prev->name == 'span'
|
$prev->name == 'span'
|
||||||
) {
|
) {
|
||||||
$token = false;
|
$token = false;
|
||||||
$prev->_InjectorTest_EndRewindInjector_delete = true;
|
$this->deleteElement = true;
|
||||||
$this->rewindOffset(1);
|
$this->rewindOffset(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user