[whatwg] Allowing ">" in attribute values

Henri Sivonen hsivonen at iki.fi
Thu Jun 24 01:00:27 PDT 2010


"Benjamin M. Schwartz" <bmschwar at fas.harvard.edu> wrote:

> The HTML5 spec appears to allow ">" inside an attribute value.  For
> example, the following page (note the body tag) passes the
> experimental
> HTML5 validator at w3c.org:
> 
> <!DOCTYPE HTML><html><head><title></title></head>
> <body class="3>2">
> </body></html>
> 
> I think ">" should be disallowed inside attribute values.   It is
> disallowed in XHTML [1].  It is disallowed in HTML 4.01 [2]. 
> Disallowing
> it in HTML5 would avoid unnecessary divergence, and also sometimes
> simplify parsing.

Actually, disallowing it would require adding a switch-case to check for '>'. Not checking for it is simpler.

I think we shouldn't disallow harmless stuff just because XML or HTML 4.01 did.

-- 
Henri Sivonen
hsivonen at iki.fi
http://hsivonen.iki.fi/



More information about the whatwg mailing list