html attributes can either be name/value pairs OR boolean attributes.
most boolean attributes can be handled by using the key as the value.
e.g. these two are the same
<input type="checkbox" name="foo" value="bar" checked />
<input type="checkbox" name="foo" value="bar" checked="checked" />
some boolean attributes aren't very well documented on how they're interpreted. for example, how schema.org uses itemscope (https://schema.org/docs/gs.html#microdata_itemscope_itemtype)
<div itemscope itemtype="http://schema.org/Movie"></div>
running this through bleach, we would get:
<div itemscope="" itemtype="http://schema.org/Movie"></div>
it would be great to allow bleach to somehow handle boolean attributes.
maybe accept a list of what should be kept as a key-only, and what should be handled as a key="key" pairing.
html attributes can either be name/value pairs OR boolean attributes.
most boolean attributes can be handled by using the key as the value.
e.g. these two are the same
some boolean attributes aren't very well documented on how they're interpreted. for example, how schema.org uses itemscope (https://schema.org/docs/gs.html#microdata_itemscope_itemtype)
running this through bleach, we would get:
it would be great to allow bleach to somehow handle boolean attributes.
maybe accept a list of what should be kept as a key-only, and what should be handled as a
key="key"pairing.