Permalink
Browse files

Removed the second HTMLEncode from generateHtmlRecursive since the im…

…porter already Encodes the contents
  • Loading branch information...
1 parent 60c63d2 commit 6a0874847b7b237f09103aa71dd575ca4985d889 @davglass committed Jan 31, 2011
Showing with 4 additions and 2 deletions.
  1. +4 −2 lib/jsdom/browser/domtohtml.js
@@ -162,12 +162,14 @@ exports.generateHtmlRecursive = function generateHtmlRecursive(element, rawText)
ret += exports.generateHtmlRecursive(element._childNodes[i], rawText);
}
} else {
- ret += rawText ? element.nodeValue : HTMLEncode(element.nodeValue);
+ //ret += rawText ? element.nodeValue : HTMLEncode(element.nodeValue);
+ ret += element.nodeValue || '';
}
ret += current.end;
break;
case element.TEXT_NODE:
- ret += rawText ? element.nodeValue : HTMLEncode(element.nodeValue);
+ //ret += rawText ? element.nodeValue : HTMLEncode(element.nodeValue);
+ ret += element.nodeValue;
break;
case element.COMMENT_NODE:
ret += '<!--' + element.nodeValue + '-->';

0 comments on commit 6a08748

Please sign in to comment.