diff options
Diffstat (limited to 'test/testabilityPatch.js')
| -rw-r--r-- | test/testabilityPatch.js | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/test/testabilityPatch.js b/test/testabilityPatch.js index 679294ee..732669c5 100644 --- a/test/testabilityPatch.js +++ b/test/testabilityPatch.js @@ -120,11 +120,14 @@ function dealoc(obj) { function sortedHtml(element, showNgClass) { var html = ""; forEach(jqLite(element), function toString(node) { + if (node.nodeName == "#text") { html += node.nodeValue. replace(/&(\w+[&;\W])?/g, function(match, entity){return entity?match:'&';}). replace(/</g, '<'). replace(/>/g, '>'); + } else if (node.nodeName == "#comment") { + html += '<!--' + node.nodeValue + '-->'; } else { html += '<' + (node.nodeName || '?NOT_A_NODE?').toLowerCase(); var attributes = node.attributes || []; |
