Open dfang opened 7 years ago
You're asking if it will change:
<div class="">stuff</div>
to:
<div>stuff</div>
Is that it?
Sounds like a good idea. Unfortunately I don't think it currently does. Would gladly accept a PR.
Just a note that some empty attributes are valid. Boolean attributes for example: http://w3c.github.io/html/infrastructure.html#boolean-attribute
A boolean attribute without a value assigned to it (e.g. checked) is implicitly equivalent to one that has the empty string assigned to it (i.e. checked=""). As a consequence, it represents the true value.
I mention this because a similar issue that I hope to open a PR for soon is that it's actually adding =""
to my boolean selectors and I would like to be able to configure that off.
I think this PR might help solve your and my issue: https://github.com/dave-kennedy/clean-html/pull/17
Just FYI the new allow-attributes-without-values
addresses the boolean attributes issue you mentioned.
as title
thanks