validator/httpd/cgi-bin check,1.765,1.766

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

Modified Files:
	check 
Log Message:
More JSON output fixes (old XML::LibXML workarounds), #7000.


Index: check
===================================================================
RCS file: /sources/public/validator/httpd/cgi-bin/check,v
retrieving revision 1.765
retrieving revision 1.766
diff -u -d -r1.765 -r1.766
--- check	26 Jan 2010 20:29:42 -0000	1.765
+++ check	2 Mar 2010 19:27:19 -0000	1.766
@@ -969,6 +969,13 @@
             for my $key (qw(msg expl)) {
                 $msg->{$key} = $json->encode($msg->{$key}) if $msg->{$key};
             }
+
+            # Drop non-numeric char indicators from output, e.g.
+            # "> 80" for some XML parse error ones (see the non-structured
+            # XML::LibXML code branch in XML preparsing below).
+            if ($msg->{char} && $msg->{char} !~ /^\d+$/) {
+                delete($msg->{char});
+            }
         }
     }
 }

Received on Tuesday, 2 March 2010 19:27:22 UTC