We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Test case as fllow:
const cheerio = require('cheerio'); const fs = require('fs'); const Entities = require('html-entities').XmlEntities; const entities = new Entities(); let $ = cheerio.load(fs.readFileSync('./test.html').toString()); /** ----file: test.html ---- <!DOCTYPE html> <html> <head> </head> <body> <textarea style="display:none">{"bug":"景点<1km"}</textarea> </body> </html> **/ let html = $('body > textarea').html(); let text = $('body > textarea').text(); let val = $('body > textarea').val(); // I want test {"bug":"景点<1km"}, but it return: {"bug":" console.log(html); console.log(text); console.log(val); console.log(entities.decode(html));
{"bug":"景点<1km"}
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Test case as fllow:
I can't get what i want :
I think the char "<" should not be processed in a string
The text was updated successfully, but these errors were encountered: