diff options
author | ot <ot@localhost> | 2008-08-26 14:59:13 +0000 |
---|---|---|
committer | ot <ot@localhost> | 2008-08-26 14:59:13 +0000 |
commit | e0d9b3516671aab0384d26550d39fee2671b7ff4 (patch) | |
tree | f6a8748a38450e96fcc8ccb366d1b4f0487a99f8 | |
parent | 2ec8c9d4664b19fee555b639495353ff1090e07d (diff) | |
download | markup-validator-e0d9b3516671aab0384d26550d39fee2671b7ff4.zip markup-validator-e0d9b3516671aab0384d26550d39fee2671b7ff4.tar.gz markup-validator-e0d9b3516671aab0384d26550d39fee2671b7ff4.tar.bz2 |
muting the "contradictory parse mode" warning for HTML5 docs served as app/x+x
-rwxr-xr-x | httpd/cgi-bin/check | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/httpd/cgi-bin/check b/httpd/cgi-bin/check index 89f3d9c..7bea8b5 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.601 2008-08-22 11:36:29 ot Exp $ +# $Id: check,v 1.602 2008-08-26 14:59:13 ot Exp $ # # Disable buffering on STDOUT! @@ -191,7 +191,7 @@ Directory not readable (permission denied): @_r # # Strings - $VERSION = q$Revision: 1.601 $; + $VERSION = q$Revision: 1.602 $; $VERSION =~ s/Revision: ([\d\.]+) /$1/; # @@ -2401,10 +2401,11 @@ sub set_parse_mode { return; } elsif ($parseModeFromMimeType ne 'TBD') { - # if The mime type gives clear indication of the parse mode - if (($parseModeFromDoctype ne 'TBD') and ($parseModeFromMimeType ne $parseModeFromDoctype)) { - # if document-type recommended mode and content-type recommended mode clash - # shoot a warning + # if The mime type gives clear indication of whether the document is XML or not + if (($parseModeFromDoctype ne 'TBD') and ($parseModeFromDoctype ne 'HTML5') and ($parseModeFromMimeType ne $parseModeFromDoctype)) { + # if document-type recommended mode and content-type recommended mode clash, shoot a warning + # unknown doctypes will not trigger this + # neither will html5 documents, which can be XML or not &add_warning('W07', { W07_mime => $File->{ContentType}, W07_ct => $parseModeFromMimeType, |