/[suikacvs]/markup/html/whatpm/Whatpm/HTML/Tokenizer.pm.src
Suika

Diff of /markup/html/whatpm/Whatpm/HTML/Tokenizer.pm.src

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.5 by wakaba, Tue Oct 14 14:38:59 2008 UTC revision 1.6 by wakaba, Tue Oct 14 14:57:52 2008 UTC
# Line 1558  sub _get_next_token ($) { Line 1558  sub _get_next_token ($) {
1558        } elsif ($self->{s_kwd} eq '[CDATA' and        } elsif ($self->{s_kwd} eq '[CDATA' and
1559                 $self->{nc} == 0x005B) { # [                 $self->{nc} == 0x005B) { # [
1560          !!!cp (135.2);          !!!cp (135.2);
1561    
1562            if ($self->{is_xml} and
1563                not $self->{tainted} and
1564                @{$self->{open_elements} or []} == 0) {
1565              !!!parse-error (type => 'cdata outside of root element',
1566                              line => $self->{line_prev},
1567                              column => $self->{column_prev} - 7);
1568              $self->{tainted} = 1;
1569            }
1570    
1571          $self->{ct} = {type => CHARACTER_TOKEN,          $self->{ct} = {type => CHARACTER_TOKEN,
1572                                    data => '',                                    data => '',
1573                                    line => $self->{line_prev},                                    line => $self->{line_prev},
# Line 2331  sub _get_next_token ($) { Line 2341  sub _get_next_token ($) {
2341          !!!next-input-character;          !!!next-input-character;
2342          redo A;          redo A;
2343        } elsif ($self->{nc} == -1) {        } elsif ($self->{nc} == -1) {
2344            if ($self->{is_xml}) {
2345              !!!parse-error (type => 'no mse'); ## TODO: type
2346            }
2347    
2348          $self->{state} = DATA_STATE;          $self->{state} = DATA_STATE;
2349          $self->{s_kwd} = '';          $self->{s_kwd} = '';
2350          !!!next-input-character;          !!!next-input-character;

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24