[whatwg] Serialization of boolean content attributes

My reading of HTML5 is that boolean content attributes with no value  
are serialized as e.g. <option selected="">. That's not what shipping  
versions of Firefox or IE do, and this markup is invalid per HTML 4,  
which is a concern for some people.

Here are some examples of what Firefox 3.6.3 does, and what would be  
my preference for WebKit (which currently matches HTML5):

<option selected> -> <option selected="selected">
<option selected=""> -> <option selected="selected">
<option selected="foo"> -> <option selected="foo">

IE is different, and serializes all these examples as <option  
selected>. That wouldn't be my preference, since that's invalid XML,  
but at least it's valid HTML 4.
This is tracked as WebKit bug <https://bugs.webkit.org/show_bug.cgi?id=22678 
 >.

- WBR, Alexey Proskuryakov

Received on Friday, 18 June 2010 10:15:15 UTC