diff options
author | ot <ot@localhost> | 2007-05-01 15:04:29 +0000 |
---|---|---|
committer | ot <ot@localhost> | 2007-05-01 15:04:29 +0000 |
commit | fdc403832e8c3d2bd6407d0117fc0027b428768f (patch) | |
tree | 09c655d25f867fb02f3a795489ce872f412550fb | |
parent | 194e713c9ce46383390dee3b256adac025e4e6ac (diff) | |
download | markup-validator-fdc403832e8c3d2bd6407d0117fc0027b428768f.zip markup-validator-fdc403832e8c3d2bd6407d0117fc0027b428768f.tar.gz markup-validator-fdc403832e8c3d2bd6407d0117fc0027b428768f.tar.bz2 |
Escape SPO's croaking on some rare error message formats.
As reported in
http://lists.w3.org/Archives/Public/www-validator/2007Apr/0118.html
and filed in
http://www.w3.org/Bugs/Public/show_bug.cgi?id=4516
-rwxr-xr-x | httpd/cgi-bin/check | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/httpd/cgi-bin/check b/httpd/cgi-bin/check index 215b550..9d66428 100755 --- a/httpd/cgi-bin/check +++ b/httpd/cgi-bin/check @@ -14,7 +14,7 @@ # This source code is available under the license at: # http://www.w3.org/Consortium/Legal/copyright-software # -# $Id: check,v 1.514 2007-04-30 16:09:09 ot Exp $ +# $Id: check,v 1.515 2007-05-01 15:04:29 ot Exp $ # # Disable buffering on STDOUT! @@ -180,7 +180,7 @@ Directory not readable (permission denied): @_r # # Strings - $VERSION = q$Revision: 1.514 $; + $VERSION = q$Revision: 1.515 $; $VERSION =~ s/Revision: ([\d\.]+) /$1/; # @@ -2325,7 +2325,14 @@ sub W3C::Validator::SAXHandler::error { my $self = shift; my $error = shift; - my $mess = $self->{_parser}->split_message($error); + my $mess; + eval { + $mess = $self->{_parser}->split_message($error); + }; + if ($@) { + # this is a message that S:P:O could not handle, we skip its croaking + return; + } my $File = $self->{_file}; # TODO: this does not filter out errors in DTDs. |