- From: Bjoern Hoehrmann via cvs-syncmail <cvsmail@w3.org>
- Date: Thu, 18 Aug 2005 03:45:10 +0000
- To: www-validator-cvs@w3.org
Update of /sources/public/validator/httpd/cgi-bin In directory hutz:/tmp/cvs-serv10248 Modified Files: check Log Message: + some todo notes Index: check =================================================================== RCS file: /sources/public/validator/httpd/cgi-bin/check,v retrieving revision 1.442 retrieving revision 1.443 diff -u -d -r1.442 -r1.443 --- check 18 Aug 2005 02:51:54 -0000 1.442 +++ check 18 Aug 2005 03:45:08 -0000 1.443 @@ -931,6 +931,10 @@ $File->{Charset}->{HTTP} = lc $charset; $File->{Modified} = $lastmod; $File->{Server} = scalar $res->server; + + # TODO: Content-Length is not always set, so either this should + # be renamed to 'Content-Length' or it should consider more than + # the Content-Length header. $File->{Size} = scalar $res->content_length; $File->{URI} = scalar $res->request->uri->canonical; $File->{'Is Upload'} = FALSE; @@ -1045,6 +1049,8 @@ sub ent { local $_ = shift; return '' unless defined; # Eliminate warnings + + # TODO: Err, why have " twice in the character class? ' maybe? s(["<&>"]){'&#' . ord($&) . ';'}ge; # should switch to hex sooner or later return $_; } @@ -1320,6 +1326,8 @@ my $dtd = sub { return if $File->{Root}; + # TODO: These \s here are probably wrong now that the strings are utf8_on + # Same for the \w probably ($File->{Root}, $File->{DOCTYPE}) = shift =~ m(<!DOCTYPE\s+(\w+)\s+(?:PUBLIC|SYSTEM)\s+(?:[\'\"])([^\"\']+)(?:[\"\']).*>)si; }; @@ -1344,6 +1352,7 @@ $p->handler(start => $start, 'tag,attr'); $p->parse(join "\n", @{$File->{Content}}); + # TODO: These \s here are probably wrong now that the strings are utf8_on $File->{DOCTYPE} = '' unless defined $File->{DOCTYPE}; $File->{DOCTYPE} =~ s(^\s+){ }g; $File->{DOCTYPE} =~ s(\s+$){ }g; @@ -1517,7 +1526,7 @@ my $general_charset = $File->{Charset}->{Use}; my $exact_charset = $general_charset; - # eeeeek! + # TODO: This should be done before transcode() if ($general_charset eq 'utf-16') { if ($File->{Charset}->{Auto} =~ m/^utf-16[bl]e$/) { $exact_charset = $File->{Charset}->{Auto}; @@ -1964,6 +1973,8 @@ my $mess = $self->{_parser}->split_message($error); my $File = $self->{_file}; + # TODO: this does not filter out errors in DTDs. + my $err; $err->{src} = '...'; # do this with show_open_entities()? @@ -1998,6 +2009,7 @@ return; # Don't report this as a normal error. } + # TODO: calling exit() here is probably a bad idea abort_if_error_flagged($File, O_DOCTYPE); push @{$File->{Errors}}, $err;
Received on Thursday, 18 August 2005 03:45:20 UTC