-
Notifications
You must be signed in to change notification settings - Fork 63
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
Further whitespace issues #14
Comments
It seems that I was a little quick on the keys, #12 seems to be about the same issue. |
Mmh, that's not good. I did not think of Thanks for reporting! 👍 |
@alvinlindstam I know it has been a while, but I just published |
As noted in #4, mochiweb_html ignores whitespace between tags. The fix (replacing the input string using a regexp) doesn't really fix the issues though.
In this example, the whitespace is not only spaces, but also a newline. Space is not the only space character in HTML.
In this example, mochiweb properly parses the textarea contents, which is later escaped on output. But since we regex-replaced the space with
 
, that sequense is also escaped:The first issue could probably be solved with an extended regexp to match all space characters, while the second one could only be solved by making the parser keep all text nodes.
The text was updated successfully, but these errors were encountered: