mankyd / htmlmin

A configurable HTML Minifier with safety features
https://htmlmin.readthedocs.org/en/latest/
Other
129 stars 41 forks source link

missed brackets after string was minimized #48

Closed aodarc closed 6 years ago

aodarc commented 6 years ago

When I want to minify part of html ->

'<div class="footer-shadow"></div>\n<footer class="footer">\n    <div class="d-flex container justify-content-end align-items-center">\n        \n\n        \n    </div>\n</footer>'

Than I got '<div class=footer-shadow></div><footer class=footer><div class="d-flex container justify-content-end align-items-center"></div></footer>' As you can see there class=footer-shadow and there class=footer the brackets were missed.

mankyd commented 6 years ago

Are you referring to the missing double quotes around them (the ")?

The specification specifically says they are optional if there are no spaces or other special characters in an attribute.

See "unquoted attribute value syntax": https://html.spec.whatwg.org/multipage/syntax.html#attributes-2

Reopen if you are asking about something different.