-
Notifications
You must be signed in to change notification settings - Fork 168
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
Documents with doctypes and attributes on the root node break parser on a previously used document #30
Comments
You found a bug! I'll work on it in the next few days. |
Works in v0.3.4 |
Still having an issue. Same error with use of zombie,
|
Awesome. I'll dig in based on that. Here's hoping TripAdvisor doesn't change in the mean time. |
(also, you generally want to reopen an issue if you can still reproduce) |
Aha! Zombie or JSDom is initializing the parser with an empty document (twice, actually!) before the real parse. I suppose I should detect that and throw an exception. Or so it seems. |
Add an HTML5.enableDebug('parser') in your script and it shows where in the parser it stops. |
|
Here is what I get. Sorry for the mess output. |
No worries -- see that it parses an empty document twice before? It's not actually being reset after that, thanks to how Zombie starts up JSDOM. I'm looking at the best way to fix it. |
A minimal and zombie-free test case:
|
we'll see if Elijah accepts this upstream in jsdom. |
Can you try the latest master? |
I'd been using your fix before it has been updated. Thank you so much. |
i'm trying to parse www.tripadvisor.com with "zombie" (for nodejs) which uses html5.
the following exception is being thrown.
The text was updated successfully, but these errors were encountered: