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

[whatwg] Allowed characters in attribute names (was: Re: Steps for finding one or two numbers in a string)

From: Thomas Broyer <t.broyer@gmail.com>
Date: Wed, 13 Jun 2007 09:11:31 +0200
Message-ID: <a9699fd20706130011g39b9c305g1f0c5318315df2de@mail.gmail.com>
2007/6/13, Simon Pieters:
>
> Since attribute names that use characters outside ASCII aren't parse
> errors, and any attribute is allowed on the embed element, the definition
> of "Attribute names" in #writing is incorrect.

Why?
Inconsistent maybe, but not incorrect.

> I would suggest to change the definition in #writing to say that attribute
> names can consist of any characters except whitespace, =, >, / and <.

I'd rather change the #tokenisation section to generate more parse errors.

> Although that isn't quite right either. The parsing section allows
> attributes to begin with =. Given the following markup:
>
>     <a =="">
>
> Safari, Opera and Firefox drop the attribute. IE has an attribute with the
> name being the empty string and the value being ="". The HTML5 parsing
> spec says that there should be an attribute with the name = and the value
> the empty string. The "Before attribute name state" part of the parsing
> spec might have to be revisited.

Or maybe change the #creating section to drop such attributes, if we
choose to follow the Safari/Opera/Firefox path.

-- 
Thomas Broyer
Received on Wednesday, 13 June 2007 00:11:31 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:58:56 UTC