aboutsummaryrefslogtreecommitdiffstats
path: root/test/testabilityPatch.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/testabilityPatch.js')
-rw-r--r--test/testabilityPatch.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/test/testabilityPatch.js b/test/testabilityPatch.js
index b4602c39..5c6eaf4d 100644
--- a/test/testabilityPatch.js
+++ b/test/testabilityPatch.js
@@ -85,7 +85,10 @@ function sortedHtml(element) {
var html = "";
foreach(jqLite(element), function toString(node) {
if (node.nodeName == "#text") {
- html += escapeHtml(node.nodeValue);
+ html += node.nodeValue.
+ replace(/&(\w+[&;\W])?/g, function(match, entity){return entity?match:'&';}).
+ replace(/</g, '&lt;').
+ replace(/>/g, '&gt;');
} else {
html += '<' + node.nodeName.toLowerCase();
var attributes = node.attributes || [];