Skip to content
This repository has been archived by the owner on Mar 28, 2019. It is now read-only.

text nodes may or may not be incorrectly parsed #71

Open
Pomax opened this issue Dec 5, 2014 · 2 comments
Open

text nodes may or may not be incorrectly parsed #71

Pomax opened this issue Dec 5, 2014 · 2 comments

Comments

@Pomax
Copy link
Contributor

Pomax commented Dec 5, 2014

the DOM that is build for text nodes such as

<ul>
    <li>Hello Everyone
</ul>

ends up treating the text node as a sibling to the <li> rather than as a child. Depending on whether slowparsing is doing the right thing this may or may not require fixing

@lemiant
Copy link

lemiant commented Dec 9, 2014

I found an example where improper behavior for optional closing tags creates a parsing error, the following will raise a MISMATCHED_CLOSE_TAG error in slowparse:

<ol>
    <li>Hello <a>World</a>
</ol>

However this is actually valid HTML and passes the HTML5 validator
http://validator.w3.org/check?uri=http%3A%2F%2Fhost.codingproject.net%2Fslowparse_error_example.html

@Pomax
Copy link
Contributor Author

Pomax commented Dec 10, 2014

you're right. the spec says An li element's end tag may be omitted if the li element is immediately followed by another li element or if there is no more content in the parent element. so this is definitely a bug.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants