on version 1.502 of taconite-parser.js:
function handleNode(xmlNode){
var nodeType = xmlNode.nodeType;
switch(nodeType) {
case 1: //ELEMENT_NODE
return handleElement(xmlNode);
case 3: //TEXT_NODE
case 4: //CDATA_SECTION_NODE
var textNode = document.createTextNode
(xmlNode.nodeValue);
if(isIE) {
return textNode.nodeValue.replace(/
\n/g, '\r');
}
return textNode;
}
return null;
}
should be:
function handleNode(xmlNode){
var nodeType = xmlNode.nodeType;
switch(nodeType) {
case 1: //ELEMENT_NODE
return handleElement(xmlNode);
case 3: //TEXT_NODE
case 4: //CDATA_SECTION_NODE
var textNode = document.createTextNode
(xmlNode.nodeValue);
if(isIE) {
textNode.nodeValue.replace(/
\n/g, '\r');
}
return textNode;
}
return null;
}
Logged In: NO
I concur with the bug identification--I wish that I
checked for this bug being posted before I debugged it
myself. The function must return a node (or null), not a
String (the result of replace()).
As for the recommended fix, it looks good to me but I
don't know the language/DOM very well. I take it that
textNode.nodeValue.replace() both modifies
textNode.nodeValue and returns textNode.nodeValue. I don't
like that dual behaviour but if it is so then the fix
should work.