Skip Menu |
 

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

Report information
The Basics
Id: 86651
Status: resolved
Priority: 0/
Queue: XML-Twig

People
Owner: Nobody in particular
Requestors: HMBRAND [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in: 3.44
Fixed in: 3.45



Subject: formatting creates invalid XML due to quotes
Download (untitled) / with headers
text/plain 509b
$ cat test.xml <?xml version="1.0" encoding="UTF-8"?> <things> <thing name='"foo' size="3" /> </things> $ xml_pp < test.xml >z.xml $ cat z.xml <?xml version="1.0" encoding="UTF-8"?> <things> <thing name=""foo" size="3"/> </things> $ xml_pp < z.xml not well-formed (invalid token) at line 3, column 16, byte 64: <things> <thing name=""foo" size="3"/> ===============^ </things> at /pro/lib/perl5/site_perl/5.18.0/i686-linux-64int-ld/XML/Parser.pm line 187. at /pro/bin/xml_pp line 82. Exit 255 $
Subject: Re: [rt.cpan.org #86651] formatting creates invalid XML due to quotes
Date: Tue, 02 Jul 2013 19:41:22 +0000
To: bug-XML-Twig [...] rt.cpan.org
From: mirod <xmltwig [...] gmail.com>
Download (untitled) / with headers
text/plain 1.3k
On 07/02/2013 06:58 PM, H.Merijn Brand via RT wrote: Show quoted text
> Tue Jul 02 14:58:25 2013: Request 86651 was acted upon. > Transaction: Ticket created by HMBRAND > Queue: XML-Twig > Subject: formatting creates invalid XML due to quotes > Broken in: 3.44 > Severity: Critical > Owner: Nobody > Requestors: HMBRAND@cpan.org > Status: new > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=86651 > > > > $ cat test.xml > <?xml version="1.0" encoding="UTF-8"?> > <things> > <thing name='"foo' size="3" /> > </things> > $ xml_pp < test.xml >z.xml > $ cat z.xml > <?xml version="1.0" encoding="UTF-8"?> > <things> > <thing name=""foo" size="3"/> > </things> > $ xml_pp < z.xml > > not well-formed (invalid token) at line 3, column 16, byte 64: > <things> > <thing name=""foo" size="3"/> > ===============^ > </things> > at /pro/lib/perl5/site_perl/5.18.0/i686-linux-64int-ld/XML/Parser.pm line 187. > at /pro/bin/xml_pp line 82. > Exit 255 > $ >
Indeed that's a critical one. It's weird, since perl -MXML::Twig -e'XML::Twig->parse( "test.xml")->print' or perl -MXML::Twig -e'XML::Twig->parse( pretty_print => "indented", "tquote.xml")->print' both do the right thing and output <thing name="&quot;foo" size="3"/> I'll look at this tomorrow. Tnaks for the report. -- mirod


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.