From 8186bce612aa493f22cbd3bf84bbd06f741a8965 Mon Sep 17 00:00:00 2001 From: Charly Koza Date: Wed, 30 Nov 2016 11:07:00 +0100 Subject: [PATCH] unwanted characters encoded test for #866 --- test/cheerio.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/test/cheerio.js b/test/cheerio.js index a119b749ce..144d9d41c5 100644 --- a/test/cheerio.js +++ b/test/cheerio.js @@ -298,6 +298,15 @@ describe('cheerio', function() { expect(domEncoded('footer').html()).to.be(expectedXml); }); + it('should not encode characters (issue #866)', function() { + var str = 'абв', + div = '
' + str + '
', + dom = $.load(div, {decodeEntities: true}); + + expect(dom.text()).to.be(str); + expect(dom.html()).to.be(div); + }); + it('should return a fully-qualified Function', function() { var $c = $.load('
');