We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9bf88b0 commit 2afd8c9Copy full SHA for 2afd8c9
1 file changed
src/resource/index.js
@@ -66,8 +66,11 @@ const Resource = {
66
let $ = cheerio.load(decodedContent);
67
68
// after first cheerio.load, check to see if encoding matches
69
+ const contentTypeSelector = cheerio.browser
70
+ ? 'meta[http-equiv=content-type]'
71
+ : 'meta[http-equiv=content-type i]';
72
const metaContentType =
- $('meta[http-equiv=content-type i]').attr('content') ||
73
+ $(contentTypeSelector).attr('content') ||
74
$('meta[charset]').attr('charset');
75
const properEncoding = getEncoding(metaContentType);
76
0 commit comments