3650 |
!!!ack-later; |
!!!ack-later; |
3651 |
return; |
return; |
3652 |
} elsif ($token->{type} == CHARACTER_TOKEN) { |
} elsif ($token->{type} == CHARACTER_TOKEN) { |
3653 |
if ($token->{data} =~ s/^([\x09\x0A\x0B\x0C\x20]+)//) { # \x0D |
if ($token->{data} =~ s/^([\x09\x0A\x0C\x20]+)//) { |
3654 |
## Ignore the token |
## Ignore the token |
3655 |
|
|
3656 |
unless (length $token->{data}) { |
unless (length $token->{data}) { |
3707 |
!!!next-token; |
!!!next-token; |
3708 |
redo B; |
redo B; |
3709 |
} elsif ($token->{type} == CHARACTER_TOKEN) { |
} elsif ($token->{type} == CHARACTER_TOKEN) { |
3710 |
if ($token->{data} =~ s/^([\x09\x0A\x0B\x0C\x20]+)//) { # \x0D |
if ($token->{data} =~ s/^([\x09\x0A\x0C\x20]+)//) { |
3711 |
## Ignore the token. |
## Ignore the token. |
3712 |
|
|
3713 |
unless (length $token->{data}) { |
unless (length $token->{data}) { |
4521 |
|
|
4522 |
if ($self->{insertion_mode} & HEAD_IMS) { |
if ($self->{insertion_mode} & HEAD_IMS) { |
4523 |
if ($token->{type} == CHARACTER_TOKEN) { |
if ($token->{type} == CHARACTER_TOKEN) { |
4524 |
if ($token->{data} =~ s/^([\x09\x0A\x0B\x0C\x20]+)//) { |
if ($token->{data} =~ s/^([\x09\x0A\x0C\x20]+)//) { |
4525 |
unless ($self->{insertion_mode} == BEFORE_HEAD_IM) { |
unless ($self->{insertion_mode} == BEFORE_HEAD_IM) { |
4526 |
!!!cp ('t88.2'); |
!!!cp ('t88.2'); |
4527 |
$self->{open_elements}->[-1]->[0]->manakai_append_text ($1); |
$self->{open_elements}->[-1]->[0]->manakai_append_text ($1); |
5512 |
} elsif ($self->{insertion_mode} & TABLE_IMS) { |
} elsif ($self->{insertion_mode} & TABLE_IMS) { |
5513 |
if ($token->{type} == CHARACTER_TOKEN) { |
if ($token->{type} == CHARACTER_TOKEN) { |
5514 |
if (not $open_tables->[-1]->[1] and # tainted |
if (not $open_tables->[-1]->[1] and # tainted |
5515 |
$token->{data} =~ s/^([\x09\x0A\x0B\x0C\x20]+)//) { |
$token->{data} =~ s/^([\x09\x0A\x0C\x20]+)//) { |
5516 |
$self->{open_elements}->[-1]->[0]->manakai_append_text ($1); |
$self->{open_elements}->[-1]->[0]->manakai_append_text ($1); |
5517 |
|
|
5518 |
unless (length $token->{data}) { |
unless (length $token->{data}) { |
6196 |
} |
} |
6197 |
} elsif ($self->{insertion_mode} == IN_COLUMN_GROUP_IM) { |
} elsif ($self->{insertion_mode} == IN_COLUMN_GROUP_IM) { |
6198 |
if ($token->{type} == CHARACTER_TOKEN) { |
if ($token->{type} == CHARACTER_TOKEN) { |
6199 |
if ($token->{data} =~ s/^([\x09\x0A\x0B\x0C\x20]+)//) { |
if ($token->{data} =~ s/^([\x09\x0A\x0C\x20]+)//) { |
6200 |
$self->{open_elements}->[-1]->[0]->manakai_append_text ($1); |
$self->{open_elements}->[-1]->[0]->manakai_append_text ($1); |
6201 |
unless (length $token->{data}) { |
unless (length $token->{data}) { |
6202 |
!!!cp ('t260'); |
!!!cp ('t260'); |
6537 |
} |
} |
6538 |
} elsif ($self->{insertion_mode} & BODY_AFTER_IMS) { |
} elsif ($self->{insertion_mode} & BODY_AFTER_IMS) { |
6539 |
if ($token->{type} == CHARACTER_TOKEN) { |
if ($token->{type} == CHARACTER_TOKEN) { |
6540 |
if ($token->{data} =~ s/^([\x09\x0A\x0B\x0C\x20]+)//) { |
if ($token->{data} =~ s/^([\x09\x0A\x0C\x20]+)//) { |
6541 |
my $data = $1; |
my $data = $1; |
6542 |
## As if in body |
## As if in body |
6543 |
$reconstruct_active_formatting_elements->($insert_to_current); |
$reconstruct_active_formatting_elements->($insert_to_current); |
6554 |
if ($self->{insertion_mode} == AFTER_HTML_BODY_IM) { |
if ($self->{insertion_mode} == AFTER_HTML_BODY_IM) { |
6555 |
!!!cp ('t301'); |
!!!cp ('t301'); |
6556 |
!!!parse-error (type => 'after html:#text', token => $token); |
!!!parse-error (type => 'after html:#text', token => $token); |
6557 |
|
# |
|
## Reprocess in the "after body" insertion mode. |
|
6558 |
} else { |
} else { |
6559 |
!!!cp ('t302'); |
!!!cp ('t302'); |
6560 |
|
## "after body" insertion mode |
6561 |
|
!!!parse-error (type => 'after body:#text', token => $token); |
6562 |
|
# |
6563 |
} |
} |
|
|
|
|
## "after body" insertion mode |
|
|
!!!parse-error (type => 'after body:#text', token => $token); |
|
6564 |
|
|
6565 |
$self->{insertion_mode} = IN_BODY_IM; |
$self->{insertion_mode} = IN_BODY_IM; |
6566 |
## reprocess |
## reprocess |
6570 |
!!!cp ('t303'); |
!!!cp ('t303'); |
6571 |
!!!parse-error (type => 'after html', |
!!!parse-error (type => 'after html', |
6572 |
text => $token->{tag_name}, token => $token); |
text => $token->{tag_name}, token => $token); |
6573 |
|
# |
|
## Reprocess in the "after body" insertion mode. |
|
6574 |
} else { |
} else { |
6575 |
!!!cp ('t304'); |
!!!cp ('t304'); |
6576 |
|
## "after body" insertion mode |
6577 |
|
!!!parse-error (type => 'after body', |
6578 |
|
text => $token->{tag_name}, token => $token); |
6579 |
|
# |
6580 |
} |
} |
6581 |
|
|
|
## "after body" insertion mode |
|
|
!!!parse-error (type => 'after body', |
|
|
text => $token->{tag_name}, token => $token); |
|
|
|
|
6582 |
$self->{insertion_mode} = IN_BODY_IM; |
$self->{insertion_mode} = IN_BODY_IM; |
6583 |
!!!ack-later; |
!!!ack-later; |
6584 |
## reprocess |
## reprocess |
6589 |
!!!parse-error (type => 'after html:/', |
!!!parse-error (type => 'after html:/', |
6590 |
text => $token->{tag_name}, token => $token); |
text => $token->{tag_name}, token => $token); |
6591 |
|
|
6592 |
$self->{insertion_mode} = AFTER_BODY_IM; |
$self->{insertion_mode} = IN_BODY_IM; |
6593 |
## Reprocess in the "after body" insertion mode. |
## Reprocess. |
6594 |
|
next B; |
6595 |
} else { |
} else { |
6596 |
!!!cp ('t306'); |
!!!cp ('t306'); |
6597 |
} |
} |
6629 |
} |
} |
6630 |
} elsif ($self->{insertion_mode} & FRAME_IMS) { |
} elsif ($self->{insertion_mode} & FRAME_IMS) { |
6631 |
if ($token->{type} == CHARACTER_TOKEN) { |
if ($token->{type} == CHARACTER_TOKEN) { |
6632 |
if ($token->{data} =~ s/^([\x09\x0A\x0B\x0C\x20]+)//) { |
if ($token->{data} =~ s/^([\x09\x0A\x0C\x20]+)//) { |
6633 |
$self->{open_elements}->[-1]->[0]->manakai_append_text ($1); |
$self->{open_elements}->[-1]->[0]->manakai_append_text ($1); |
6634 |
|
|
6635 |
unless (length $token->{data}) { |
unless (length $token->{data}) { |
6639 |
} |
} |
6640 |
} |
} |
6641 |
|
|
6642 |
if ($token->{data} =~ s/^[^\x09\x0A\x0B\x0C\x20]+//) { |
if ($token->{data} =~ s/^[^\x09\x0A\x0C\x20]+//) { |
6643 |
if ($self->{insertion_mode} == IN_FRAMESET_IM) { |
if ($self->{insertion_mode} == IN_FRAMESET_IM) { |
6644 |
!!!cp ('t311'); |
!!!cp ('t311'); |
6645 |
!!!parse-error (type => 'in frameset:#text', token => $token); |
!!!parse-error (type => 'in frameset:#text', token => $token); |