mirror of
https://github.com/ezyang/htmlpurifier.git
synced 2024-12-22 08:21:52 +00:00
Delete asserts, fixes #97.
Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
This commit is contained in:
parent
1ef4375dbb
commit
08eee90e15
@ -19,8 +19,8 @@ class HTMLPurifier_Arborize
|
|||||||
if ($token instanceof HTMLPurifier_Token_End) {
|
if ($token instanceof HTMLPurifier_Token_End) {
|
||||||
$token->start = null; // [MUT]
|
$token->start = null; // [MUT]
|
||||||
$r = array_pop($stack);
|
$r = array_pop($stack);
|
||||||
assert($r->name === $token->name);
|
//assert($r->name === $token->name);
|
||||||
assert(empty($token->attr));
|
//assert(empty($token->attr));
|
||||||
$r->endCol = $token->col;
|
$r->endCol = $token->col;
|
||||||
$r->endLine = $token->line;
|
$r->endLine = $token->line;
|
||||||
$r->endArmor = $token->armor;
|
$r->endArmor = $token->armor;
|
||||||
@ -32,7 +32,7 @@ class HTMLPurifier_Arborize
|
|||||||
$stack[] = $node;
|
$stack[] = $node;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
assert(count($stack) == 1);
|
//assert(count($stack) == 1);
|
||||||
return $stack[0];
|
return $stack[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -203,7 +203,7 @@ class HTMLPurifier_ChildDef_Table extends HTMLPurifier_ChildDef
|
|||||||
$current_tr_tbody->children[] = $node;
|
$current_tr_tbody->children[] = $node;
|
||||||
break;
|
break;
|
||||||
case '#PCDATA':
|
case '#PCDATA':
|
||||||
assert($node->is_whitespace);
|
//assert($node->is_whitespace);
|
||||||
if ($current_tr_tbody === null) {
|
if ($current_tr_tbody === null) {
|
||||||
$ret[] = $node;
|
$ret[] = $node;
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user