Skip Menu |

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

Report information
The Basics
Id: 71962
Status: new
Priority: 0/
Queue: XML-SAX-Writer

Owner: Nobody in particular
Requestors: jpdalbec [...]

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

Subject: XML::SAX::Writer::XML encodes ]]> incorrectly in CDATA
Date: Wed, 26 Oct 2011 17:31:51 -0400
To: bug-XML-SAX-Writer [...]
From: John Dalbec <jpdalbec [...]>
Download (untitled) / with headers
text/plain 570b
I believe the correct encoding for ]]> is ]]&gt; sub characters { ... if ($self->{InCDATA}) { # we must scan for ]]> in the CDATA and escape it if it # is present by close--opening # we need to have buffer text in front of this... $char = join ']]>]]&lt;<![CDATA[', split ']]>', $char; } ... } use XML::SAX::Writer; my $writer=XML::SAX::Writer->new(); $writer->start_document(); $writer->start_cdata(); $writer->characters({Data=>"x]]>y"}); $writer->end_cdata(); $writer->end_document(); <![CDATA[x]]>]]&lt;<![CDATA[y]]>

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

Please report any issues with to