Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by S on Aug 14, 2008 20:44
open dhtmlx forum
Escaped characters split causing Load XML error

I am inserting an escaped single quote (') into a tree and the escaped character is getting truncated to get displayed in the tree. This causes the following XML to get loaded (note the &) cutting the encoded character and replacing it with '...". How can I fix this?



<tree id='tc_303'>
    
    <item id='303_s_2' text='#########0#########0#########0#&...' child='0' im0='er.gif'
Answer posted by Support on Aug 15, 2008 03:46
The & is reserved character in both XML and HTML, so it requires a gouble quoting, such as 

<item text="some&amp;quot;text"  // => some"text

or itemtext tag with CDATA can be used

<item id="some">
     <itemtext><![CDATA[ some&quot;text ]]></itemtext>