unquoted last attr breaks html parser
clarfonthey opened this issue · 5 comments
Relatively trimmed example HTML: <!DOCTYPE html><meta charset=UTF-8><div class=dark><section><p>Paragraph</section></div>
Not 100% sure what the cause is. Commented on the line in the commit that fails.
@clarfon try the latest commit.
btw, your example has an unclosed <p>
. not sure if that was intentional, but it'll also cause parsing to fail.
The unclosed <p>
is actually valid in the standard; there are a few tags for which a close is implied, and I believe that <p>
and <li>
are the main ones.
Anyway, will check out the commit when I get a chance.
ah yes, i keep forgetting what's technically valid #35 ;)
i continue to wonder why a person who writes html like this would choose to use DropCSS which has the explicitly stated goal of only supporting markup with no ambiguities or edge cases.
That is definitely fair; if unclosed tags are out of scope for the parser then I will make sure they get added in by minifiers :p
i'm gonna close this since the issue in the example provided looks resolved. let me know if this needs to be re-opened.
thanks for reporting!