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

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

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 2228  sub _get_next_token ($) { Line 2228  sub _get_next_token ($) {
2228        } elsif ($self->{s_kwd} eq '[CDATA' and        } elsif ($self->{s_kwd} eq '[CDATA' and
2229                 $self->{nc} == 0x005B) { # [                 $self->{nc} == 0x005B) { # [
2230                    
2231    
2232            if ($self->{is_xml} and
2233                not $self->{tainted} and
2234                @{$self->{open_elements} or []} == 0) {
2235              $self->{parse_error}->(level => $self->{level}->{must}, type => 'cdata outside of root element',
2236                              line => $self->{line_prev},
2237                              column => $self->{column_prev} - 7);
2238              $self->{tainted} = 1;
2239            }
2240    
2241          $self->{ct} = {type => CHARACTER_TOKEN,          $self->{ct} = {type => CHARACTER_TOKEN,
2242                                    data => '',                                    data => '',
2243                                    line => $self->{line_prev},                                    line => $self->{line_prev},
# Line 3631  sub _get_next_token ($) { Line 3641  sub _get_next_token ($) {
3641        
3642          redo A;          redo A;
3643        } elsif ($self->{nc} == -1) {        } elsif ($self->{nc} == -1) {
3644            if ($self->{is_xml}) {
3645              $self->{parse_error}->(level => $self->{level}->{must}, type => 'no mse'); ## TODO: type
3646            }
3647    
3648          $self->{state} = DATA_STATE;          $self->{state} = DATA_STATE;
3649          $self->{s_kwd} = '';          $self->{s_kwd} = '';
3650                    

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

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24