validator/httpd/cgi-bin check,1.625,1.626

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

Modified Files:
	check 
Log Message:
Cleanups.

Index: check
===================================================================
RCS file: /sources/public/validator/httpd/cgi-bin/check,v
retrieving revision 1.625
retrieving revision 1.626
diff -u -d -r1.625 -r1.626
--- check	4 Jan 2009 20:05:51 -0000	1.625
+++ check	4 Jan 2009 20:08:26 -0000	1.626
@@ -639,19 +639,21 @@
 #
 # Override DOCTYPE if user asked for it.
 if ($File->{Opt}->{DOCTYPE}) {
-  if (not $File->{Opt}->{DOCTYPE} =~ /(Inline|detect)/i) {
-   $File = &override_doctype($File);
+  if ($File->{Opt}->{DOCTYPE} !~ /(Inline|detect)/i) {
+    $File = &override_doctype($File);
+  }
+  else {
+    # Get rid of inline|detect for easy truth value checking later
+    $File->{Opt}->{DOCTYPE} = '';
   }
 }
 
 # Try to extract a DOCTYPE or xmlns.
 $File = &preparse_doctype($File);
 
-if ($File->{Opt}->{DOCTYPE}) {
-  if ($File->{Opt}->{DOCTYPE} eq "HTML5") {
-    $File->{DOCTYPE} = "HTML5";
-    $File->{Version} = $File->{DOCTYPE};
-  }
+if ($File->{Opt}->{DOCTYPE} eq "HTML5") {
+  $File->{DOCTYPE} = "HTML5";
+  $File->{Version} = $File->{DOCTYPE};
 }
 
 set_parse_mode($File, $CFG);

Received on Sunday, 4 January 2009 20:08:44 UTC