diff options
-rw-r--r-- | htdocs/config/types.conf | 22 | ||||
-rwxr-xr-x | httpd/cgi-bin/check | 21 |
2 files changed, 35 insertions, 8 deletions
diff --git a/htdocs/config/types.conf b/htdocs/config/types.conf index 10e65e9..decbffb 100644 --- a/htdocs/config/types.conf +++ b/htdocs/config/types.conf @@ -1,7 +1,7 @@ # # Main Document Type Database for the W3C Markup Validation Service. # -# $Id: types.conf,v 1.40 2008-08-11 20:09:24 ot Exp $ +# $Id: types.conf,v 1.41 2008-08-15 19:29:27 ot Exp $ # # Maintains all information for each of the document types we support. # See 'perldoc Config::General' for the syntax, and be aware that the @@ -267,6 +267,26 @@ </Badge> </HTML_4_01_Frameset> +<HTML5> + Name = html + Display = HTML5 + Info URL = http://www.w3.org/TR/html5/ + <Types> + Allowed = text/html application/xhtml+xml + # + </Types> + # <Badge> + # URI = http://www.w3.org/Icons/valid-html401 + # ALT URI = http://www.w3.org/Icons/valid-html401-blue + # Local URI = images/valid_icons/valid-html401 + # Local ALT URI = images/valid_icons/valid-html401-blue + # Height = 31 + # Width = 88 + # Alt = Valid HTML 4.01 Frameset + # </Badge> +</HTML5> + + <XHTML_1_0_Strict> Name = html Display = XHTML 1.0 Strict diff --git a/httpd/cgi-bin/check b/httpd/cgi-bin/check index 98c033f..ff279b5 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.595 2008-08-15 18:52:49 ot Exp $ +# $Id: check,v 1.596 2008-08-15 19:29:27 ot Exp $ # # Disable buffering on STDOUT! @@ -191,7 +191,7 @@ Directory not readable (permission denied): @_r # # Strings - $VERSION = q$Revision: 1.595 $; + $VERSION = q$Revision: 1.596 $; $VERSION =~ s/Revision: ([\d\.]+) /$1/; # @@ -844,7 +844,7 @@ sub html5_validate (\$) { $ua->default_header(Cache_control=> "max-age=0"); my $res = $ua->request(POST "$CFG->{External}->{HTML5}", Content_Type => 'form-data', - Content => [out => "xml", parser=>$html5_parser, content => $File->{Bytes}]); + Content => [out => "xml", parser=>$html5_parser, content => join "\n", @{$File->{Content}}]); if (! $res->is_success()) { $File->{'Error Flagged'} = TRUE; $File->{Templates}->{Error}->param(fatal_no_checker => TRUE); @@ -1749,10 +1749,17 @@ sub override_doctype { my $pubid = $dt->{PubID}; my $sysid = $dt->{SysID}; my $name = $dt->{Name}; - local $dtd = qq(<!DOCTYPE $name PUBLIC "$pubid"); - $dtd .= qq( "$sysid") if $sysid; # We don't have one for all types. - $dtd .= '>'; - + local $dtd; + + if (($pubid ne "") and ($sysid ne "")) { + $dtd = qq(<!DOCTYPE $name PUBLIC "$pubid"); + $dtd .= qq( "$sysid") if $sysid; # We don't have one for all types. + $dtd .= '>'; + } + else { + $dtd = qq(<!DOCTYPE $name>); + } + local $org_dtd = ''; local $HTML = ''; local $seen = FALSE; |