Skip to content

Commit

Permalink
fix: Restore   behavior from v0.1.27 (#67)
Browse files Browse the repository at this point in the history
Might be considered a breaking change.

fixes #57
  • Loading branch information
karfau committed Jul 1, 2020
1 parent 56ef3cc commit 84eb68c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
2 changes: 1 addition & 1 deletion lib/entities.js
Expand Up @@ -69,7 +69,7 @@ exports.entityMap = {
yacute: "ý",
thorn: "þ",
yuml: "ÿ",
nbsp: " ",
nbsp: "\u00a0",
iexcl: "¡",
cent: "¢",
pound: "£",
Expand Down
7 changes: 1 addition & 6 deletions test/html/normalize.vows.js
Expand Up @@ -13,13 +13,8 @@ wows.describe('html normalizer').addBatch({
assert(dom+'', '<div xmlns="http://www.w3.org/1999/xhtml">&lt;123e>&amp;&lt;a<br/></div>');

var dom = new DOMParser().parseFromString('<div>&nbsp;&copy;&nbsp&copy</div>','text/html');
assert.skip(
dom+'', '<div xmlns="http://www.w3.org/1999/xhtml">\u00a0\u00a9&amp;nbsp&amp;copy</div>',
'see https://github.com/xmldom/xmldom/issues/57'
);
assert(dom+'', '<div xmlns="http://www.w3.org/1999/xhtml"> \u00a9&amp;nbsp&amp;copy</div>');
assert(dom+'', '<div xmlns="http://www.w3.org/1999/xhtml">\u00a0\u00a9&amp;nbsp&amp;copy</div>');


var dom = new DOMParser().parseFromString('<html xmlns:x="1"><body/></html>','text/html');
assert(dom+'', '<html xmlns:x="1" xmlns="http://www.w3.org/1999/xhtml"><body></body></html>');
},
Expand Down

0 comments on commit 84eb68c

Please sign in to comment.