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&]T. YU.γw _`M. ?*8VuXLWzXt05zA,]zv݆kAF9tb;2WO0y=68MίԠF";0qS*޷d*"r> iMJQ f>"KIl)nZm-0Al)Pm-0Al)Pm-0Al)PҵG"'zÀY5("je'͉UF'T"*p6%kdv.gt,vKwE츝Dvsev-(Q_!z?dܡ|cCa|dlԾ*2_}rme35 M}t9_g,>VbLn.+l`[W`3x JcCqN C3z"]cLڑ)4;H'|4u*mzZӅqΏʬjxCyO|juO<}znu޿1f<[m~`'  Y.bqYqVx"cr:8|BNtN~{Wܰ{yT{(5CՖԋ쟳7 nA겢cRg~]c,aT~ &]5b0Z4X`!ie?AsxB$o! Y Zoگs-}/f.oC-k~rWZQϣLOT!x<q}jLG?j'N0ֶ0 [/t. ray_reverse($node->children) - already processed // children. $parent_def = $definition->info_parent_def; $stack = array( array($top_node, $parent_def->descendants_are_inline, $parent_def->excludes, // exclusions 0) ); while (!empty($stack)) { list($node, $is_inline, $excludes, $ix) = array_pop($stack); // recursive call $go = false; $def = empty($stack) ? $definition->info_parent_def : $definition->info[$node->name]; while (isset($node->children[$ix])) { $child = $node->children[$ix++]; if ($child instanceof HTMLPurifier_Node_Element) { $go = true; $stack[] = array($node, $is_inline, $excludes, $ix); $stack[] = array($child, // ToDo: I don't think it matters if it's def or // child_def, but double check this... $is_inline || $def->descendants_are_inline, empty($def->excludes) ? $excludes : array_merge($excludes, $def->excludes), 0); break; } }; if ($go) continue; list($token, $d) = $node->toTokenPair(); // base case if ($excludes_enabled && isset($excludes[$node->name])) { $node->dead = true; if ($e) $e->send(E_ERROR, 'Strategy_FixNesting: Node excluded'); } else { // XXX I suppose it would be slightly more efficient to // avoid the allocation here and have children // strategies handle it $children = array(); foreach ($node->children as $child) { if (!$child->dead) $children[] = $child; } $result = $def->child->validateChildren($children, $config, $context); if ($result === true) { // nop $node->children = $children; } elseif ($result === false) { $node->dead = true; if ($e) $e->send(E_ERROR, 'Strategy_FixNesting: Node removed'); } else { $node->children = $result; if ($e) { // XXX This will miss mutations of internal nodes. Perhaps defer to the child validators if (empty($result) && !empty($children)) { $e->send(E_ERROR, 'Strategy_FixNesting: Node contents removed'); } else if ($result != $children) { $e->send(E_WARNING, 'Strategy_FixNesting: Node reorganized'); } } } } } //####################################################################// // Post-processing // remove context variables $context->destroy('IsInline'); $context->destroy('CurrentNode'); $context->destroy('CurrentToken'); //####################################################################// // Return return HTMLPurifier_Arborize::flatten($node, $config, $context); } } // vim: et sw=4 sts=4