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

Fixed bug #61 (Parser hangs on some input) #62

Closed
wants to merge 3 commits into from

Conversation

arnaud-lb
Copy link

This fixes bug #61 (Parser hangs on some input).

The bug is caused by _reTagName (/^\s*(\/?)\s*([^\s\/]+)/) doing too much backtracking when the input string contains many whitespaces.

kirbysayshi pushed a commit to kirbysayshi/node-htmlparser that referenced this pull request Dec 19, 2013
fixes tautologistics#62

apparently Google's gumbo-parser does behave this way:
https://github.com/google/gumbo-parser/blob/101726c50e172e45be6002c51b85
e45f27f0c2c6/src/tokenizer.c#L322
@arnaud-lb arnaud-lb closed this Dec 17, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant