-
Notifications
You must be signed in to change notification settings - Fork 30
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
Default to HTML parsing? #11
Comments
I think this makes sense for |
I did some testing with preact-boilerplate and preact-markup in IE (code is here), and indeed there is an issue in IE9 (emulated) when using
No line number or anything is provided by the browser, so I’m unable to debug this. The page renders correctly in IE11 and IE10. |
something going wrong here: |
I wrote If
into: I haven't found an elegant solution to this in my repo yet, either - but I'd love to collaborate on one. There's been some discussion related to it at TroyAlford/react-jsx-parser#4 |
@TroyAlford if you ping me via preact-slack.now.sh I'd be happy to chat - seems like we need to find a decent wrapper around DOMParser that normalizes those differences. FWIW the self-closing thing could be avoided by setting the content type argument to |
Leaving out
type="html"
causes XML parsing, which breaks when the markup contains empty HTML elements that aren’t self-closed, e.g.<img>
,<br>
,<input>
. This is especially problematic if the markup was generated by a Markdown processor (e.g. Marked does not self-close empty HTML elements). Due to this limitation, I think it makes sense to default to HTML parsing.Related discussion in preact-markdown: laggingreflex/preact-markdown#1 (comment)
The text was updated successfully, but these errors were encountered: