[whatwg] Empty attribute syntax

timeless timeless at gmail.com
Tue Jun 12 19:33:53 PDT 2007

On 6/13/07, Simon Pieters <zcorpan at gmail.com> wrote:
> I realised that IE7 and Opera dropped the href attribute when using the
> markup "<a href>". So I decided to test whether this happened to other
> attributes as well.
> The test takes a while to run. 001.htm doesn't work in Opera, and
> 001-opera.htm doesn't work in IE7. In Firefox you'll get the "heavy
> script" dialog; just press "continue".
>     http://simon.html5.org/test/html/parsing/empty-attribute-syntax/
> Results:
> IE7 drops the following attributes:
>     <a href>
>     <area href>
>     <input src>
>     <iframe src>
>     <img src>

we had someone come on irc.mozilla.org asking for help working around
<img src> it seems their buggy app was written to ie, so when firefox
runs, it treats <img src=""> or maybe <img src> as <img
src="{current-html-document}"> which then breaks their broken app
because it's a duplicate resource request for some resource which
clearly doesn't handle the case.

I'm not absolutely certain which of <img src> or <img src=""> the
person had, and I suggested adding a <base href>, but I do not recall
the person indicating whether it worked.


> Opera drops a whole lot of attributes. Here's for the <a> tag only:
>     <a accept charset class id onkeypress onkeydown onkeyup onclick
>     ondblclick onmousedown onmouseup onmouseover onmousemove onmouseout
>     onmousewheel onerror onload onresize onscroll onunload onreset onsubmit
>     onblur onchange onfocus oninput onselect accessKey action archive
>     autocomplete axis background char charset cite classid code codeBase
>     codeType cols content data dateTime dynsrc encType face for headers href
>     hreflang http-equiv label language longDesc name profile prompt rel rev
>     rows scheme scope src standby summary target useMap value valuetype
>     version wrap xmlns>
> Firefox and Safari don't drop any attributes.

More information about the whatwg mailing list