diff --git a/lib/index.js b/lib/index.js index c5af86a..c5476e4 100644 --- a/lib/index.js +++ b/lib/index.js @@ -239,9 +239,9 @@ function main() { enc = 'utf-8'; } + cheerioLoadOptions.decodeEntities = false; if (enc !== 'utf-8') { debug('decoding from: %s', enc); - cheerioLoadOptions.decodeEntities = false; body = iconv.encode(iconv.decode(res.body, enc), 'utf-8'); } else { body = res.body; diff --git a/test/fixtures/html-whitespaces.result.html b/test/fixtures/html-whitespaces.result.html index edb9355..eb607d4 100644 --- a/test/fixtures/html-whitespaces.result.html +++ b/test/fixtures/html-whitespaces.result.html @@ -1,15 +1,15 @@ - html whitespaces
// projector page window.addEventListener('storage', function (event) { if (event.key === 'currentSlide') { goToSlide(event.newValue); } });
// projector page
+    html whitespaces   
// projector page window.addEventListener('storage', function (event) { if (event.key === 'currentSlide') { goToSlide(event.newValue); } });
// projector page
 
-    window.addEventListener('storage', function (event) {
+    window.addEventListener('storage', function (event) {
 
-        if (event.key === 'currentSlide') {
+        if (event.key === 'currentSlide') {
             goToSlide(event.newValue);
         }
     });
\ No newline at end of file + });
diff --git a/test/fixtures/image-style-attr.result.html b/test/fixtures/image-style-attr.result.html index 0434141..daba661 100644 --- a/test/fixtures/image-style-attr.result.html +++ b/test/fixtures/image-style-attr.result.html @@ -1 +1 @@ - css image in style attr
+ css image in style attr