-
-
Notifications
You must be signed in to change notification settings - Fork 31
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
Inline HTML blocks with < and > chars don't get parsed as HTML #123
Comments
Shouldn't it be escaped? When I enter something similar here it gives an error: https://validator.w3.org/nu/#textarea So instead of this:
Wouldn't the correct way to write that raw HTML be something like this? |
I think that error is specific to path strings like |
Oh okay, thank you for clarifying! Then it does seem like a bug indeed. The HTML parser is forked from https://github.com/jinjor/elm-xml-parser. I searched through there but couldn't find a related issue unfortunately. But the error code must be somewhere within this code path I think: elm-markdown/src/HtmlParser.elm Lines 396 to 407 in a483add
|
This issue only exists in inline HTML blocks and doesn't exist in HTML blocks. So the error code is less likely in HtmlParser.elm. |
I can fix this by allowing <> within "" or <> in inline Html. In other worlds, clearing the tokens of "<>" when it's in <> or "" in InlineParser.elm. Is that align with the spec? elm-markdown/src/Markdown/InlineParser.elm Lines 244 to 254 in a483add
|
That sounds right to me @LutSa! Within the context of |
Pretty sure this is a bug!
Failing test: (note: first test passes, second inline test fails)
master...thomasin:elm-markdown:bug/html-attributes
I think it has something to do with the inline logic, because it only affects inline HTML blocks, but all of that code is a bit more opaque to me.
The text was updated successfully, but these errors were encountered: