- From: Olivier Thereaux via cvs-syncmail <cvsmail@w3.org>
- Date: Fri, 15 Aug 2008 19:29:30 +0000
- To: www-validator-cvs@w3.org
Update of /sources/public/validator/httpd/cgi-bin
In directory hutz:/tmp/cvs-serv3676/httpd/cgi-bin
Modified Files:
check
Log Message:
making sure HTML5 plays nice with doctype override
Index: check
===================================================================
RCS file: /sources/public/validator/httpd/cgi-bin/check,v
retrieving revision 1.595
retrieving revision 1.596
diff -u -d -r1.595 -r1.596
--- check 15 Aug 2008 18:52:49 -0000 1.595
+++ check 15 Aug 2008 19:29:27 -0000 1.596
@@ -844,7 +844,7 @@
$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 @@
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;
Received on Friday, 15 August 2008 19:30:10 UTC