Quantcast
Channel: Internet Explorer 8, 9, 10 Forum
Viewing all articles
Browse latest Browse all 1908

XMLHttpRequest responseXML in IE10 converting cdata node text to html entities

$
0
0

In an AJAX request when I go to parse the response to a string all html tags are being converted to their xml entities.  

Ex:

var childNodes = nodes[i].childNodes;
for(var j=0; j<childNodes.length; j++) {
if (window.ActiveXObject && nodes[0] && nodes[0].xml) {
nodeVal += childNodes[j].xml;
} else {
nodeVal += (new XMLSerializer()).serializeToString(childNodes[j]);
}
}

The value of childNodes[j] is:

<![CDATA[<span>this is a test</span>]]>

but once it has been serialized to a string the value is:

&lt;span&gt;this is a test&lt;/span&gt;

Also notice that the cdata tags were removed.  This works fine in all other browsers and was working fine in IE10 release preview on windows 7 but now that I have the full version of IE10 on windows 7 this is happening.  

I'm assuming this is a bug and is there a work around for it?


Viewing all articles
Browse latest Browse all 1908

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>