| @@ 68-74 (lines=7) @@ | ||
| 65 | foreach ($tokens_of_children as $token) { |
|
| 66 | $is_child = ($nesting == 0); |
|
| 67 | ||
| 68 | if ($token === false) { |
|
| 69 | // terminating sequence started |
|
| 70 | } elseif ($token instanceof HTMLPurifier_Token_Start) { |
|
| 71 | $nesting++; |
|
| 72 | } elseif ($token instanceof HTMLPurifier_Token_End) { |
|
| 73 | $nesting--; |
|
| 74 | } |
|
| 75 | ||
| 76 | // handle node collection |
|
| 77 | if ($is_collecting) { |
|
| @@ 174-178 (lines=5) @@ | ||
| 171 | $result = $this->forward($i, $current); |
|
| 172 | if (!$result) return false; |
|
| 173 | if ($nesting === null) $nesting = 0; |
|
| 174 | if ($current instanceof HTMLPurifier_Token_Start) $nesting++; |
|
| 175 | elseif ($current instanceof HTMLPurifier_Token_End) { |
|
| 176 | if ($nesting <= 0) return false; |
|
| 177 | $nesting--; |
|
| 178 | } |
|
| 179 | return true; |
|
| 180 | } |
|
| 181 | ||