On Wed May 12 04:50:56 2010, xmltwig@gmail.com wrote:
Show quoted text> On 05/11/2010 10:45 PM, Konstantin Tchernov via RT wrote:
> > Tue May 11 16:45:06 2010: Request 57389 was acted upon.
> > Transaction: Ticket created by ktchernov
> > Queue: XML-Twig
> > Subject: Comments are not escaped
> > Broken in: 3.34
> > Severity: Important
> > Owner: Nobody
> > Requestors: k.tchernov@gmail.com
> > Status: new
> > Ticket<URL:
https://rt.cpan.org/Ticket/Display.html?id=57389>
> >
> >
> > XML comments should not contain "--", Twig does not escape this
sequence.
Show quoted text> > If a comment field contains this value the generated XML is invalid.
> >
> > Steps to reproduce:
> >
> > my $el = XML::Twig::Elt->new('#COMMENT' => 'A -- B');
> >
> > $el->print;
> >
> > output is:
> >
> > <!--A -- B-->
>
> Duh!
>
> Thanks, patch is on its way.
>
I've got one more case for you, if the comment ends with "-" then the
XML also gets broken:
XML::Twig::Elt->new('#COMMENT' => 'A -')->print();
will give you a: "<!--A --->", which is also invalid.