1
Vote

Save changes fails on duplicate nodes

description

When saving content on a CDATA node the save fails without displaying error messages. This seems to happen on duplicated nodes: e.g:
 
<node name="test">
<subnode><![CDATA[Text1]]></subnode>
</node>
<node>
<subnode><![CDATA[Text2]]></subnode>
</node>

comments

udayandas wrote Oct 3, 2011 at 10:47 AM

Been bit busy lately! I'm going to take a look and also possibly introduce a newer version

ffabrizio wrote Oct 3, 2011 at 11:20 AM

Hi there, I have implemented a fix if you want. TreeBuilder.cs...


Updated code on line 1038

Old code:
if (string.Compare(((XmlCDataSection)n).Data.Trim(), tn.Text.Trim(), true) == 0)

New code:
if (string.Compare(((XmlCDataSection)n).Data.Trim(), tn.CDATA.Trim(), true) == 0 || string.Compare(((XmlCDataSection)n).Data.Trim(), HttpUtility.HtmlDecode(tn.CDATA.Trim()), true) == 0))


Cheers

wrote Feb 14, 2013 at 7:31 PM