Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2013-04

xmlwrite rejects valid CDATA xml (regression in 2.6.2)

2 messages · 1 person ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Seth Grover

Given this XML file:

=============================
<?xml version="1.0"?>
<item>
<description>
<![CDATA[This is a description for a test [...] and will fail]]> </description>
</item>
=============================

WriteXMLFile in xmlwrite.pp throws an "Illegal character" exception on the "]" character in CDSectSpecialCharCallback. However, this behavior is incorrect. Only "]]>" marks the end of a CDATA section, any other characters, including square brackets, should be allowed.

This seems to be a regression in 2.6.2, as it works in 2.6.0.

I did find http://mantis.freepascal.org/view.php?id=20780 and http://svn.freepascal.org/cgi-bin/viewvc.cgi?revision=19792&view=revisionwhich seem to be what introduced this bug.

I'll log a bug for it in Mantis, but I thought I'd also bring it up in this to see if there should be any discussion about it.

Thanks guys, have a good one.

-SG

Seth Grover ΜΟΛΩΝ ΛΑΒΕ

Reply by email

Seth Grover
to Seth Grover

I'm sorry, my google-foo is not up to snuff today. I just found bug 23794, it looks like this has been resolved already. Ignore my earlier email.

-SG

Seth Grover ΜΟΛΩΝ ΛΑΒΕ On Mon, Apr 15, 2013 at 1:18 PM, Seth Grover wrote: > Given this XML file: > > ============================= > <?xml version="1.0"?> > <item> > <description> > <![CDATA[This is a description for a test [...] and will fail]]> > </description> > </item> > ============================= > > WriteXMLFile in xmlwrite.pp throws an "Illegal character" exception on the > "]" character in CDSectSpecialCharCallback. However, this behavior is > incorrect. Only "]]>" marks the end of a CDATA section, any other > characters, including square brackets, should be allowed. > > This seems to be a regression in 2.6.2, as it works in 2.6.0. > > I did find http://mantis.freepascal.org/view.php?id=20780 and > http://svn.freepascal.org/cgi-bin/viewvc.cgi?revision=19792&view=revisionwhich seem to be what introduced this bug. > > I'll log a bug for it in Mantis, but I thought I'd also bring it up in > this to see if there should be any discussion about it. > > Thanks guys, have a good one. > > -SG > > -- > Seth Grover > > ΜΟΛΩΝ ΛΑΒΕ >

Reply by email