[whatwg] Allowing ">" in attribute values
Simetrical+w3c at gmail.com
Thu Jun 24 14:38:32 PDT 2010
On Thu, Jun 24, 2010 at 9:34 AM, Benjamin M. Schwartz
<bmschwar at fas.harvard.edu> wrote:
> HTML5 is about making a spec that matches common practice, right? In
> practice, no one puts ">" in attribute values.
HTML5 matches common practice when necessary to ensure
interoperability. That doesn't apply to authoring requirements.
HTML5 permits many weird types of markup that no one uses (there are
probably much weirder things than this), and prohibits tons of things
that people do use (like presentational markup).
Make sure you keep authoring and implementation conformance separate.
Implementations will *always* be required to handle > in attributes as
they do now, regardless of whether it's prohibited for authors,
because that parsing is almost certainly necessary for compatibility
with tons of web content. Changing the authoring requirements will
not affect implementers' jobs at all, so any argument based on making
HTML easier to parse is invalid from the start.
The only plausible use I see for this is to catch mismatched quotes in
an attribute value, like <a href="http://mysite.com>Click here!</a>.
But such markup is likely to cause a huge number of errors anyway,
like (in this case) an invalid URL, probably followed by an invalid
attribute, etc. Not to mention content vanishing. So I don't think
there's any gain in banning it.
More information about the whatwg