mirror of
https://github.com/ezyang/htmlpurifier.git
synced 2025-01-03 05:11:52 +00:00
Mod: using null instead of false
This commit is contained in:
parent
cb4871f446
commit
b9bc1039da
@ -50,7 +50,7 @@ class HTMLPurifier_ChildDef_List extends HTMLPurifier_ChildDef
|
|||||||
// a little sanity check to make sure it's not ALL whitespace
|
// a little sanity check to make sure it's not ALL whitespace
|
||||||
$all_whitespace = true;
|
$all_whitespace = true;
|
||||||
|
|
||||||
$current_li = new stdClass();
|
$current_li = null;
|
||||||
|
|
||||||
foreach ($children as $node) {
|
foreach ($children as $node) {
|
||||||
if (!empty($node->is_whitespace)) {
|
if (!empty($node->is_whitespace)) {
|
||||||
@ -71,7 +71,7 @@ class HTMLPurifier_ChildDef_List extends HTMLPurifier_ChildDef
|
|||||||
// to handle non-list elements; non-list elements should
|
// to handle non-list elements; non-list elements should
|
||||||
// not be appended to an existing li; only li created
|
// not be appended to an existing li; only li created
|
||||||
// for non-list. This distinction is not currently made.
|
// for non-list. This distinction is not currently made.
|
||||||
if (get_class($current_li) === "stdClass") {
|
if ($current_li === null) {
|
||||||
$current_li = new HTMLPurifier_Node_Element('li');
|
$current_li = new HTMLPurifier_Node_Element('li');
|
||||||
$result[] = $current_li;
|
$result[] = $current_li;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user