-
Notifications
You must be signed in to change notification settings - Fork 571
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
< parsing bug #306
Comments
Probably because it tries to parse it as a start tag. Better error notifications are on radar (we're relying on old-ish but heavily modified html parser by John Resig). Please feel free to contribute. |
yeah, i figured, I think its due to not being able to find a closing tag >, and then other tags come in and the whole thing explodes (but silently, which is the problem in fact) I'd contribute some code but I'm late on my delivery. I got the system to run btw, by removing all the <'s the problem is if ever it bombs along the line I won't have a way to know. I'd suggest instead of returning a parsed text as var res = myFunc(), you do var = res myFunc(..., callback -> (err, html)) then you're backward compatible and ready for error handling (even ugly one) just as long as it doesn't explode |
Well, technically |
that's a theological debate, of course it should and if you're doing simple html pages that's easy to run but if you're doing a server script that includes dozens of templates, then you add some DB content in the mix and you pull external html-ready content (syndication) you get a hodgepodge of html, which is the key reason why one would want it all minimised as it looks like dogs dinner once is all built and riddled with comments, spaces and other crap. We can't just assume coders (like me) are not idiots, that's wishful thinking on the other end as all programs should be able to exit gracefully and handle their own shit, i think your library is the big daddy, it does the job amazingly i've got 50ms/page end to end (which includes EJS, db and other back end nonsense) and thats pretty good in my book on my macAir. I promise one day I'll sit down and write a decent html parser (i've been promising that to myself for the last 10+ years lol) |
Yeah, I know how hairy it could get. We'll definitely make those errors more descriptive; hopefully sooner than in 10 years :P |
Duplicate of #332 |
The parser with just hang and explode without any message when it encounters < in text (not <)
so for example if you have a statement in html text
..some html...
hello
< world
.. some html...
it will crash with no notification.
I'm testing it on NodeJS
The text was updated successfully, but these errors were encountered: