validator/httpd/cgi-bin check,1.609,1.610

Update of /sources/public/validator/httpd/cgi-bin
In directory hutz:/tmp/cvs-serv10382

Modified Files:
	check 
Log Message:
Construct proper doctype override with public/system id missing/empty (related to #6250).

Index: check
===================================================================
RCS file: /sources/public/validator/httpd/cgi-bin/check,v
retrieving revision 1.609
retrieving revision 1.610
diff -u -d -r1.609 -r1.610
--- check	3 Jan 2009 15:24:33 -0000	1.609
+++ check	3 Jan 2009 21:02:28 -0000	1.610
@@ -1764,16 +1764,17 @@
   my $pubid = $dt->{PubID};
   my $sysid = $dt->{SysID};
   my $name  = $dt->{Name};
-  local $dtd;
 
-  if ($pubid ne "") {
-    $dtd = qq(<!DOCTYPE $name PUBLIC "$pubid");
-    $dtd .= qq( "$sysid") if $sysid; # We don't have one for all types.
-    $dtd .= '>';
+  # We don't have public/system ids for all types.
+  local $dtd = "<!DOCTYPE $name";
+  if ($pubid) {
+    $dtd .= qq( PUBLIC "$pubid");
+    $dtd .= qq( "$sysid") if $sysid;
   }
-  else {
-    $dtd = qq(<!DOCTYPE $name>);
+  elsif ($sysid) {
+    $dtd .= qq( SYSTEM "$sysid");
   }
+  $dtd .= '>';
 
   local $org_dtd = '';
   local $HTML    = '';

Received on Saturday, 3 January 2009 21:02:40 UTC