- From: Boris Zbarsky <bzbarsky@MIT.EDU>
- Date: Tue, 26 Apr 2011 12:14:49 -0400
- To: public-iri@w3.org
On 4/26/11 12:03 PM, Julian Reschke wrote: > <base href="data://foo/bar?baz#qux"> > <a href="taco.html">hello</a> > <script> > alert(document.getElementsByTagName('a')[0].href) > </script> > > The results are: > > A: Firefox 4, IE 9: ignore the <base> element, and resolve "taco.html" > against where the document was served from ... > - This is an edge case; unless I'm missing something, using "data:" as a > base URI is meaningless. This is what FF and IE seem to think. That's not what Gecko thinks. What Gecko thinks is that this is a URI it can't parse at all as a URI, so it ignores the <base>. The reason it can't parse it is that the string after "data:" doesn't match the production we expect for a data: URI (no comma, for example). You would get the same effect in Gecko with: <base href="http://spaces here/"> <a href="taco.html">hello</a> <script> alert(document.getElementsByTagName('a')[0].href) </script> (but not if you removed the ' ' in the http URI, note). > - There's no interop here at all. So it appears we could recommend > something that is actually based by the specs. Assuming this test is representative. Is it? -Boris
Received on Tuesday, 26 April 2011 16:15:18 UTC