Skip Menu |

This queue is for tickets about the XML-Liberal CPAN distribution.

Report information
The Basics
Id: 57958
Status: new
Priority: 0/
Queue: XML-Liberal

People
Owner: Nobody in particular
Requestors: user42 [...] zip.com.au
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: repair single-digit low ascii 
Date: Sat, 29 May 2010 08:49:29 +1000
To: bug-XML-Liberal [...] rt.cpan.org
From: Kevin Ryde <user42 [...] zip.com.au>
With XML::Liberal 0.22 and recent debian i386 perl 5.10.1 the program foo.pl below gets an error Can't find low ascii bytes at /usr/share/perl5/XML/Liberal.pm line 74 :1: parser error : xmlParseCharRef: invalid xmlChar value 8 <foo>&#x8;</foo> ^ where I hoped XML::Liberal could repair this &#x8; the same way that it can repair a two-digit form like &#x08; I think a single digit hex is allowed in xml, eg. &#x9 for a tab, it's just the value 8 for a backspace is bad. When run as "perl -w foo.pl" the program also gets a warning Use of uninitialized value in concatenation (.) or string at /usr/share/perl5/XML/Liberal/Remedy/LowAsciiChars.pm line 15. but perhaps that's a separate problem. I struck this in a recent http://search.cpan.org/uploads.rdf where a dodgy backspace in the pod of Xymon::Client 0.01 worked its way through to the feed xml.
#!/usr/bin/perl -w use strict; use warnings; use XML::Liberal; print "XML::Liberal ", XML::Liberal->VERSION, "\n"; my $parser = XML::Liberal->new('LibXML'); my $doc = $parser->parse_string('<foo>&#x8;</foo>'); print "$doc\n";