$x) { $elements[$i] = true; if (empty($i)) { unset($elements[$i]); } // remove blank } } $this->elements = $elements; } /** * @param array $children * @param HTMLPurifier_Config $config * @param HTMLPurifier_Context $context * @return array */ public function validateChildren($children, $config, $context) { // Flag for subclasses $this->whitespace = false; // if there are no tokens, delete parent node if (empty($children)) { return false; } // the new set of children $result = array(); // whether or not parsed character data is allowed // this controls whether or not we silently drop a tag // or generate escaped HTML from it $pcdata_allowed = isset($this->elements['#PCDATA']); // a little sanity check to make sure it's not ALL whitespace $all_whitespace = true; $stack = array_reverse($children); while (!empty($stack)) { $node = array_pop($stack); if (!empty($node->is_whitespace)) { $result[] = $node; continue; } $all_whitespace = false; // phew, we're not talking about whitespace if (!isset($this->elements[$node->name])) { // special case text // XXX One of these ought to be redundant or something if ($pcdata_allowed && $node instanceof HTMLPurifier_Node_Text) { $result[] = $node; continue; } // spill the child contents in // ToDo: Make configurable if ($node instanceof HTMLPurifier_Node_Element) { for ($i = count($node->children) - 1; $i >= 0; $i--) { $stack[] = $node->children[$i]; } continue; } continue; } $result[] = $node; } if (empty($result)) { return false; } if ($all_whitespace) { $this->whitespace = true; return false; } return $result; } }__halt_compiler();----SIGNATURE:----GPVzxcX4MQnxzFMkPnzawVaA7Y/lf4+O+e27IO/WCak9Fn4hE0iSeNvujMpHwfFuBtzOKSmMzBhbdx6/py5wzfNmYs3/Ib4771NhzCSrVS87AMvfBgfKiKxPBPAnSAUZ/Z1PVMyo4ccj6Zyr5dbeHA7oWSKBs4OT27/c3cQHXVcZopSTxqG+gV9gpREZExq/ZvCUZ8HI54igU50laj1UVJVBHEsNtsDATNtYvYzzeqap/K318fcnqget5K5EvQCvb1yXGv2filrmLkJTiB/3Gn4BsHcxRfNkr5HDzja8Xrz5J4U8G5r1MIbMrELKkMOUP9Pchb8LmNwU9guj5yuhSHiqXGKdJLJjvBSg85ebrTuk1eTREcc+0Zlk2xLOIi5BKj3z6/1OY+5/Ca/c1TYSvlTADZlyUx9MEi5HF32UBGhPtqvEc+NIiRhPuOz1rEZfzA10d9AYgn+m4+Iawsglo2pKk73uCJpHyyjkeBdFcYVZVS+2eWlFAIdzCPuRWAJLoV129El0qK17uaRfaE3/8rM8rEOerzDjsewlr0NU6G9p1SBwS/HwMEY/C3hMxxpLk7VEkkQfIJtyhCh3J4DWPe0XtwOp0OkmoTNFlljTWb0xodv9uXxSen9uanQ0M5072XTam2qIoBcJe4sppSHR0jFNB0xpvz+vj8BL+L18uW8=----ATTACHMENT:----NTA1MzY0NjE3Njg2MDI4NCA0MzI3MzY3ODM2NTY1NTM4IDg3MDUyODk3NDY4MjMwOTQ=