| @@ 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 | // See Note [Injector skips] |
|
| 214 | continue; |
|
| 215 | } |
|
| 216 | if ($token->rewind !== null && $token->rewind !== $i) { |
|
| 217 | continue; |
|
| 218 | } |
|
| 219 | // XXX fuckup |
|
| 220 | $r = $token; |
|
| 221 | $injector->handleText($r); |
|
| 222 | $token = $this->processToken($r, $i); |
|
| 223 | $reprocess = true; |
|
| 224 | break; |
|
| 225 | } |
|
| 226 | } |
|
| 227 | // another possibility is a comment |
|
| @@ 369-381 (lines=13) @@ | ||
| 366 | } |
|
| 367 | ||
| 368 | if ($ok) { |
|
| 369 | foreach ($this->injectors as $i => $injector) { |
|
| 370 | if (isset($token->skip[$i])) { |
|
| 371 | // See Note [Injector skips] |
|
| 372 | continue; |
|
| 373 | } |
|
| 374 | if ($token->rewind !== null && $token->rewind !== $i) { |
|
| 375 | continue; |
|
| 376 | } |
|
| 377 | $r = $token; |
|
| 378 | $injector->handleElement($r); |
|
| 379 | $token = $this->processToken($r, $i); |
|
| 380 | $reprocess = true; |
|
| 381 | break; |
|
| 382 | } |
|
| 383 | if (!$reprocess) { |
|
| 384 | // ah, nothing interesting happened; do normal processing |
|
| @@ 425-438 (lines=14) @@ | ||
| 422 | $current_parent = array_pop($this->stack); |
|
| 423 | if ($current_parent->name == $token->name) { |
|
| 424 | $token->start = $current_parent; |
|
| 425 | foreach ($this->injectors as $i => $injector) { |
|
| 426 | if (isset($token->skip[$i])) { |
|
| 427 | // See Note [Injector skips] |
|
| 428 | continue; |
|
| 429 | } |
|
| 430 | if ($token->rewind !== null && $token->rewind !== $i) { |
|
| 431 | continue; |
|
| 432 | } |
|
| 433 | $r = $token; |
|
| 434 | $injector->handleEnd($r); |
|
| 435 | $token = $this->processToken($r, $i); |
|
| 436 | $this->stack[] = $current_parent; |
|
| 437 | $reprocess = true; |
|
| 438 | break; |
|
| 439 | } |
|
| 440 | continue; |
|
| 441 | } |
|