question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cheerio .html() should not encode cyrillic symbols

See original GitHub issue
var cheerio = require('cheerio');
var $ = cheerio.load('<div>кириллица</div>');
console.log($.html()); // => <div>&#x43A;&#x438;&#x440;&#x438;&#x43B;&#x43B;&#x438;&#x446;&#x430;</div>

when expected output is <div>кириллица</div>

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

8reactions
fb55commented, May 21, 2015

decodeEntities is not an option for .html, but for .load (or the constructor).

5reactions
therobhrtcommented, May 19, 2015

Found a solution in #466 with $.html({decodeEntities: false}), which works fine. Anybody knows what could be the downsides of using this option?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Node.js Cheerio parser breaks UTF-8 encoding - Stack Overflow
The way cheerio works is that is tries to decode characters by nature and present the numerical HTML encoding of the Unicode character....
Read more >
cheerio
Cheerio can parse nearly any HTML or XML document. Cheerio works in both browser and Node environments. Cheerio is not a web browser....
Read more >
textract - npm
Extracting text from files of various type including html, pdf, doc, docx, ... Does textract not extract from files of the type you...
Read more >
iptcembed - Manual - PHP
The following code embeds both IPTC APP segment 13 and EXIF APP segment 1 data from a source file and embeds it into...
Read more >
Cheerio Scraper - HTML scraping tool - Apify
Cheerio Scraper is ideal for scraping web pages that do not rely on client-side ... the symbol must be encoded as [\x5B] or...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found