W3C home > Mailing lists > Public > whatwg@whatwg.org > June 2010

[whatwg] Allowing ">" in attribute values

From: Benjamin M. Schwartz <bmschwar@fas.harvard.edu>
Date: Wed, 23 Jun 2010 22:13:56 -0400
Message-ID: <4C22BF64.5090708@fas.harvard.edu>
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">

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.


[1] according to the validator in XHTML 1.1 Strict mode.

'character ">" is not allowed in the value of attribute'

[2] http://www.w3.org/TR/REC-html40/charset.html#h-5.3.2

"Similarly, authors should use "&gt;" (ASCII decimal 62) in text instead
of ">" to avoid problems with older user agents that incorrectly perceive
this as the end of a tag (tag close delimiter) when it appears in quoted
attribute values."

It is also disallowed by the HTML 4.01 Strict validator.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: OpenPGP digital signature
URL: <http://lists.whatwg.org/pipermail/whatwg-whatwg.org/attachments/20100623/64d97b07/attachment.pgp>
Received on Wednesday, 23 June 2010 19:13:56 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:24 UTC