Skip to content

Commit 0dc010f

Browse files
committed
Fix our xmlMode option forwarding to xml.xmlMode for htmlparser2
1 parent 8106ac2 commit 0dc010f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/cheerio.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ var cheerio = require('cheerio');
77
var utils = require('./utils');
88

99
var cheerioLoad = function(html, options, encodeEntities) {
10-
options = Object.assign({xml: {decodeEntities: false}}, options);
10+
const { xmlMode, ...rest } = options;
11+
options = Object.assign({ xml: { decodeEntities: false, xmlMode } }, rest);
1112
html = encodeEntities(html);
1213
return cheerio.load(html, options);
1314
};

0 commit comments

Comments
 (0)