diff options
author | ot <ot@localhost> | 2007-06-21 19:33:50 +0000 |
---|---|---|
committer | ot <ot@localhost> | 2007-06-21 19:33:50 +0000 |
commit | 15ea532e7d863e6f92baf3b900f18fc4cd7cc22a (patch) | |
tree | e00b82b05ba3eb8b6143c617fe15183d7d41b5f0 /httpd/cgi-bin/check | |
parent | 5dc909eade05886c13a4ad1d94fda57c975cac8c (diff) | |
download | markup-validator-15ea532e7d863e6f92baf3b900f18fc4cd7cc22a.zip markup-validator-15ea532e7d863e6f92baf3b900f18fc4cd7cc22a.tar.gz markup-validator-15ea532e7d863e6f92baf3b900f18fc4cd7cc22a.tar.bz2 |
adding a case for non-html, non-xml document without a doctype.
Diffstat (limited to 'httpd/cgi-bin/check')
-rwxr-xr-x | httpd/cgi-bin/check | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/httpd/cgi-bin/check b/httpd/cgi-bin/check index bf17457..609f1a4 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.526 2007-06-12 11:58:58 ot Exp $ +# $Id: check,v 1.527 2007-06-21 19:33:50 ot Exp $ # # Disable buffering on STDOUT! @@ -181,7 +181,7 @@ Directory not readable (permission denied): @_r # # Strings - $VERSION = q$Revision: 1.526 $; + $VERSION = q$Revision: 1.527 $; $VERSION =~ s/Revision: ([\d\.]+) /$1/; # @@ -2416,6 +2416,12 @@ sub W3C::Validator::SAXHandler::error 'XHTML 1.0 Transitional' : 'HTML 4.01 Transitional' ); add_warning('W09', {W09_dtd => $dtd}); } + else { # not html root element, we are not using fallback + if ($File->{Mode} ne 'XML') { + $File->{'Is Valid'} = FALSE; + add_warning('W09nohtml', {}); + } + } return; # Don't report this as a normal error. } |