W3C home > Mailing lists > Public > www-validator-cvs@w3.org > March 2010

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

From: Ville Skytta via cvs-syncmail <cvsmail@w3.org>
Date: Tue, 02 Mar 2010 19:27:21 +0000
To: www-validator-cvs@w3.org
Message-Id: <E1NmXkX-0004HP-HD@lionel-hutz.w3.org>
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 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 26 April 2012 12:55:19 GMT