html-minifier
html-minifier copied to clipboard
Should not strip type="text" from <input> tag due to CSS rules needing it
Yes, I know that type="text" is the default for an tag, so therefore it should be safe to strip it out.
The problem is when there are css rules that assume that this attribute has not been stripped out.
e.g.
input[type=text], input[type=email], input[type=submit] {
...
}
It just seems safer to not strip that out.
There is an option for this:
https://github.com/kangax/html-minifier#options-quick-reference
Does this work for you? If not please provide a code snippet where this does not resolve your issue.
Alternatively you can tell html-minifier to ignore parts of the code. https://github.com/kangax/html-minifier#ignoring-chunks-of-markup
Changing the default would be a breaking change imho.