-
Notifications
You must be signed in to change notification settings - Fork 139
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
bug when parsing <script> tag using some template system #29
Comments
The funny thing is that, if you add a space between the script and the h1-tag, it actually works: https://github.com/FB55/node-htmlparser/blob/master/tests/23-template_script_tags.js |
Nothing funny about it, @fb55. The problem is deep inside parseTags(), where it consumes the first less-than symbol following any tag, including the script tag, but then correctly goes back into text-parsing mode to handle all of the template. |
I fixed the bug inside my own fork, the test linked above passes without a problem (the additional space was removed). |
were left unmolested. This is to ensure that script tags can be used for some language other than Javascript. The test data has a unit of whitespace at the very front to work around tautologistics/node-htmlparser#29
This piece of code discards "<" of <h1> and outputs:
The text was updated successfully, but these errors were encountered: