[whatwg] Allowed characters in attribute names (was: Re: Steps for finding one or two numbers in a string)
Thomas Broyer
t.broyer at gmail.com
Wed Jun 13 00:11:31 PDT 2007
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
More information about the whatwg
mailing list