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
[4.0-pre] parsing invalid input #847
Comments
Thanks @alexlamsl - it should definitely throw an error about invalid input. |
There is also (The HTML entity characters are intentionally left not decoded.) |
As of a239f68, One down, one to go 👍 |
Thanks @alexlamsl for keeping a close eye on this! |
Why: * Browsers won't apply such rules so neither should we.
I've added more rules to ignoring invalid selectors but that list may not be exhaustive. |
If I got this right, the current master Also, this test now fails:
Expects
Actual
|
There isn't anything in the |
Ah it's being reported as a warning instead. Skipping minification on sighting on any warnings seem a little bit of an overkill though? |
I've put up a branch for illustrating the failures: https://github.com/kangax/html-minifier/tree/clean-css-4 After checking out and switching to the branch, just |
@alexlamsl yup, these are warnings for the reason you mentioned. If browsers safely ignore such rules so should we. Thanks for the clean-css-4 branch. Will check out those failures. |
@jakubpawlowicz so if I understand you correctly, with those chunks chopped off there won't be any loss of (CSS) functionality (read: broken the same way) in modern web browsers? If so, I guess |
With the latest version,
<![CDATA[p.b{background:red}]]>
get parsed and gives<![CDATA[p.b{background:red}
whereas 3.x will leave it as is.Ideally it should throw an error, but in any case
html-minifier
has already dropped support forCDATA
, so this isn't the end of the world but I thought I'll let you know of the behavioural difference.The text was updated successfully, but these errors were encountered: