Skip to content
New issue

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

Using htmlparser2 results in mutilated doctype #4068

Open
ttencate opened this issue Sep 3, 2024 · 2 comments
Open

Using htmlparser2 results in mutilated doctype #4068

ttencate opened this issue Sep 3, 2024 · 2 comments

Comments

@ttencate
Copy link

ttencate commented Sep 3, 2024

Using cheerio 1.0.0.

const cheerio = require('cheerio')
const htmlparser2 = require('htmlparser2')

const HTML = '<!DOCTYPE html><html></html>'

console.log(
  cheerio
    .load(htmlparser2.parseDocument(HTML, {}))
    .html())

Expected output:

<!DOCTYPE html><html></html>

Actual output:

<!DOCTYPE ><html></html>
@wastedev
Copy link

wastedev commented Nov 8, 2024

Bump!

@B4nan
Copy link

B4nan commented Nov 8, 2024

It's a shame there are bugs in the v1 release and nobody seems to even try to respond to them, yet alone try to fix them. This radio silence from the maintainers is just sad and breaks the trust. Not to mention the charade with releasing so many additional BCs on top of the last RC version, which broke half of the internet. It's called "release candidate" because it means not much will change except bug fixes, yet this was the exact opposite.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants