Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix encoding test to reflect browser behaviour
Tested with Chrome.
  • Loading branch information
Sebmaster authored and domenic committed Jul 9, 2014
1 parent 92e5c65 commit 4354ea4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/jsdom/index.js
Expand Up @@ -865,10 +865,10 @@ exports.tests = {
parsing_and_serializing_unknown_entities: function (test) {
var html = '<html><body>&nowayjose;&#x263a;&#xblah;&#9q;</body></html>';
var document = jsdom.jsdom(html);
test.strictEqual(document.body.firstChild.nodeValue, "&nowayjose;☺&#xblah;&#9q;",
"Unknown and unparsable entities should be left in the decoded text");
test.strictEqual(document.body.innerHTML, "&amp;nowayjose;☺&amp;#xblah;&amp;#9q;",
"Unknown and unparsable entities should be reserialized as literal text");
test.strictEqual(document.body.firstChild.nodeValue, "&nowayjose;☺lah; q;",
"Unknown and unparsable entities should be handled like a browser would");
test.strictEqual(document.body.innerHTML, "&amp;nowayjose;☺lah; q;",
"Unknown and unparsable entities should be handled like a browser would");
test.done();
},

Expand Down

0 comments on commit 4354ea4

Please sign in to comment.