Project

Profile

Help

Bug #3385

closed

Failure to handle CDATA nodes correctly

Added by Michael Kay over 6 years ago. Updated almost 4 years ago.

Status:
Closed
Priority:
Low
Assignee:
Category:
-
Sprint/Milestone:
-
Start date:
2017-08-11
Due date:
% Done:

0%

Estimated time:
Applies to JS Branch:
Fix Committed on JS Branch:
Fixed in JS Release:
SEF Generated with:
Platforms:
Company:
-
Contact person:
-
Additional contact persons:
-

Description

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.

Please register to edit this issue

Also available in: Atom PDF Tracking page