@@ 211-224 (lines=14) @@ | ||
208 | // quick-check: if it's not a tag, no need to process |
|
209 | if (empty($token->is_tag)) { |
|
210 | if ($token instanceof HTMLPurifier_Token_Text) { |
|
211 | foreach ($this->injectors as $i => $injector) { |
|
212 | if (isset($token->skip[$i])) { |
|
213 | continue; |
|
214 | } |
|
215 | if ($token->rewind !== null && $token->rewind !== $i) { |
|
216 | continue; |
|
217 | } |
|
218 | // XXX fuckup |
|
219 | $r = $token; |
|
220 | $injector->handleText($r); |
|
221 | $token = $this->processToken($r, $i); |
|
222 | $reprocess = true; |
|
223 | break; |
|
224 | } |
|
225 | } |
|
226 | // another possibility is a comment |
|
227 | continue; |
|
@@ 368-380 (lines=13) @@ | ||
365 | } |
|
366 | ||
367 | if ($ok) { |
|
368 | foreach ($this->injectors as $i => $injector) { |
|
369 | if (isset($token->skip[$i])) { |
|
370 | continue; |
|
371 | } |
|
372 | if ($token->rewind !== null && $token->rewind !== $i) { |
|
373 | continue; |
|
374 | } |
|
375 | $r = $token; |
|
376 | $injector->handleElement($r); |
|
377 | $token = $this->processToken($r, $i); |
|
378 | $reprocess = true; |
|
379 | break; |
|
380 | } |
|
381 | if (!$reprocess) { |
|
382 | // ah, nothing interesting happened; do normal processing |
|
383 | if ($token instanceof HTMLPurifier_Token_Start) { |
|
@@ 423-436 (lines=14) @@ | ||
420 | $current_parent = array_pop($this->stack); |
|
421 | if ($current_parent->name == $token->name) { |
|
422 | $token->start = $current_parent; |
|
423 | foreach ($this->injectors as $i => $injector) { |
|
424 | if (isset($token->skip[$i])) { |
|
425 | continue; |
|
426 | } |
|
427 | if ($token->rewind !== null && $token->rewind !== $i) { |
|
428 | continue; |
|
429 | } |
|
430 | $r = $token; |
|
431 | $injector->handleEnd($r); |
|
432 | $token = $this->processToken($r, $i); |
|
433 | $this->stack[] = $current_parent; |
|
434 | $reprocess = true; |
|
435 | break; |
|
436 | } |
|
437 | continue; |
|
438 | } |
|
439 |