Project

Profile

Help

Bug #3385

Updated by Michael Kay almost 4 years ago

DOM documents created by an XML parser (as distinct from documents created using XSLT) can contain CDATA nodes. There are many paths where we are failing to deal with these. 


 


 I came across one, in DomUtils.xmlToStringInner() we have a branch in the switch to handle CDATA nodes, but it wasn't applying escaping. (This caused a failure of one of the copy tests, unfortunately I failed to note which one). I've fixed this on the 2.0 branch. 


 


 A search for the constant TEXT_NODE reveals many cases where we handle text nodes without also handling CDATA nodes. 


 


 It may be worth doing a soak test of this by modifying the XML parser we use under Nashorn to generate CDATA nodes instead of text nodes. 
 

Back