Skip to content

Commit 4354ea4

Browse files
Sebmasterdomenic
authored andcommitted
Fix encoding test to reflect browser behaviour
Tested with Chrome.
1 parent 92e5c65 commit 4354ea4

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

test/jsdom/index.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -865,10 +865,10 @@ exports.tests = {
865865
parsing_and_serializing_unknown_entities: function (test) {
866866
var html = '<html><body>&nowayjose;&#x263a;&#xblah;&#9q;</body></html>';
867867
var document = jsdom.jsdom(html);
868-
test.strictEqual(document.body.firstChild.nodeValue, "&nowayjose;☺&#xblah;&#9q;",
869-
"Unknown and unparsable entities should be left in the decoded text");
870-
test.strictEqual(document.body.innerHTML, "&amp;nowayjose;☺&amp;#xblah;&amp;#9q;",
871-
"Unknown and unparsable entities should be reserialized as literal text");
868+
test.strictEqual(document.body.firstChild.nodeValue, "&nowayjose;☺lah; q;",
869+
"Unknown and unparsable entities should be handled like a browser would");
870+
test.strictEqual(document.body.innerHTML, "&amp;nowayjose;☺lah; q;",
871+
"Unknown and unparsable entities should be handled like a browser would");
872872
test.done();
873873
},
874874

0 commit comments

Comments
 (0)