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
If executed in the browser, alert (1) will be executed successfully.
<svg><qwe></qwe><script><!--123-->a<qwe>123</qwe>l</>e</>r</1>t(<![CDATA[1)]]></script></svg>
I don't know which method to use now. The content obtained by enabling recognizeCDATA is a123lert (1)
Code
const cheerio = require('cheerio'); code =` <svg><qwe></qwe><script><!--123-->a<qwe>123</qwe>l</>e</>r</1>t(<![CDATA[1)]]></script></svg> `; cc = cheerio.load(code,{normalizeWhitespace:true,recognizeCDATA:true},false); console.log(cc.html()); cc('*').each(function() { let tagName = this.tagName; let scriptContent = cc(this).text(); console.log('tagName:', tagName, 'scriptContent:', scriptContent); });
How can I correctly obtain the actual value for this situation.
The content displayed by the browser
Actually, this feels like a browser issue.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
If executed in the browser, alert (1) will be executed successfully.
I don't know which method to use now. The content obtained by enabling recognizeCDATA is a123lert (1)
Code
How can I correctly obtain the actual value for this situation.
The content displayed by the browser
Actually, this feels like a browser issue.
The text was updated successfully, but these errors were encountered: