Cheerio only provides $.html() to get the html string. However, all the unicode is converted like 你可能感兴趣. I want to convert these encoded html to normal text like 浣犲彲鑳芥劅鍏磋叮.
How can I do it in Node.js?
$ = cheerio.load('<ul id="fruits">浣犲彲鑳芥劅鍏磋叮</ul>', {
decodeEntities: false
});
@alanev So if I already have a string of 你可能感兴趣, how can I get the original text?
I find a library to convert the html entity to unicode text.
Good job!
Cool. But what is decodeEntities used for. If set it to false, it will cause parsing slower?
Most helpful comment