validator/httpd/cgi-bin check,1.556,1.557

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

Modified Files:
	check 
Log Message:
* fixing a bug that would run Tidy on content even when not requested (that's a DUH award for me...)
* silencing some debug output



Index: check
===================================================================
RCS file: /sources/public/validator/httpd/cgi-bin/check,v
retrieving revision 1.556
retrieving revision 1.557
diff -u -d -r1.556 -r1.557
--- check	15 Aug 2007 01:33:30 -0000	1.556
+++ check	22 Aug 2007 06:25:06 -0000	1.557
@@ -902,8 +902,8 @@
 }
 
 
-## if invalid content, pass through tidy
-if (! $File->{'Is Valid'}) {
+## if invalid content, AND if requested, pass through tidy
+if ((! $File->{'Is Valid'}) and ($File->{Opt}->{'Show Tidy'}) ) {
   eval {
     local $SIG{__DIE__};
     require HTML::Tidy;
@@ -2546,9 +2546,9 @@
   # beyond EOL.  If you see this warning in your web server logs, please
   # let the validator developers know, see http://validator.w3.org/feedback.html
   if ((my $l = length($File->{Content}->[$err->{line}-1])) < $err->{char}) {
-    warn("Warning: reported error column larger than line length " .
-         "($err->{char} > $l) in $File->{URI} line $err->{line}, " .
-         "OpenSP bug? Resetting to line length.");
+    #warn("Warning: reported error column larger than line length " .
+    #     "($err->{char} > $l) in $File->{URI} line $err->{line}, " .
+    #     "OpenSP bug? Resetting to line length.");
     $err->{char} = $l;
   }
 

Received on Wednesday, 22 August 2007 06:25:18 UTC