From 84eb68c2a0bf0e7b9f526c5babd90640a0f0b557 Mon Sep 17 00:00:00 2001 From: Christian Bewernitz Date: Wed, 1 Jul 2020 20:48:14 +0200 Subject: [PATCH] fix: Restore ` ` behavior from v0.1.27 (#67) Might be considered a breaking change. fixes #57 --- lib/entities.js | 2 +- test/html/normalize.vows.js | 7 +------ 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/lib/entities.js b/lib/entities.js index 81d708200..804f59f27 100644 --- a/lib/entities.js +++ b/lib/entities.js @@ -69,7 +69,7 @@ exports.entityMap = { yacute: "ý", thorn: "þ", yuml: "ÿ", - nbsp: " ", + nbsp: "\u00a0", iexcl: "¡", cent: "¢", pound: "£", diff --git a/test/html/normalize.vows.js b/test/html/normalize.vows.js index 349ed697f..54fdd45f5 100644 --- a/test/html/normalize.vows.js +++ b/test/html/normalize.vows.js @@ -13,13 +13,8 @@ wows.describe('html normalizer').addBatch({ assert(dom+'', '
<123e>&<a
'); var dom = new DOMParser().parseFromString('
 © ©
','text/html'); - assert.skip( - dom+'', '
\u00a0\u00a9&nbsp&copy
', - 'see https://github.com/xmldom/xmldom/issues/57' - ); - assert(dom+'', '
\u00a9&nbsp&copy
'); + assert(dom+'', '
\u00a0\u00a9&nbsp&copy
'); - var dom = new DOMParser().parseFromString('','text/html'); assert(dom+'', ''); },