Closed
Bug 249881
Opened 21 years ago
Closed 21 years ago
Relative base URIs are ignored
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
RESOLVED
DUPLICATE
of bug 553074
People
(Reporter: mozilla, Unassigned)
References
()
Details
(Keywords: html5)
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.7) Gecko/20040626 Firefox/0.9.1
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.7) Gecko/20040626 Firefox/0.9.1
If a document is given a base URI which is itself relative (see the testcase at
http://purl.org/mooquackwooftweetmeow/misc/relativebaseuritestcase/subfolder/testcase.html
), relative URIs within the document do not resolve correctly.
The HTML 4 spec (at http://www.w3.org/TR/REC-html40/struct/links.html#h-12.4 )
does not say relative base URIs are illegal. DevGuru concurs (first paragraph of
http://www.devguru.com/Technologies/xhtml/quickref/xhtml_base.html ).
Opera resolves the link's URI as expected. IE tries to resolve http://../target.txt
Reproducible: Always
Steps to Reproduce:
1. Visit
http://purl.org/mooquackwooftweetmeow/misc/relativebaseuritestcase/subfolder/testcase.html
2. Click the link
Actual Results:
The URI is resolved relative to the current directory
Expected Results:
The URI should be resolved relative to the base URI, one folder up.
Comment 1•21 years ago
|
||
(In reply to comment #0)
> The HTML 4 spec (at http://www.w3.org/TR/REC-html40/struct/links.html#h-12.4 )
> does not say relative base URIs are illegal.
href = uri [CT]
This attribute specifies an absolute URI that acts as the base URI for
^^^^^^^^
resolving relative URIs.
that seems pretty clear. INVALID.
Status: UNCONFIRMED → RESOLVED
Closed: 21 years ago
Resolution: --- → INVALID
Comment 2•20 years ago
|
||
*** Bug 308498 has been marked as a duplicate of this bug. ***
Comment 7•16 years ago
|
||
Yes, it's not up to spec. Still, the other top-tier browsers (IE, Opera, Chrome, even Lynx) try to do what the author of the document intended, at least for HTML that doesn't advise itself as standards-compliant.
If the page author specifies a base of "//a/" and you've used http: to get the page, translating that base to "http://a/" is not a bad idea, especially when the alternative is likely to be every link on the page not working.
Comment 8•16 years ago
|
||
(In reply to comment #1)
> (In reply to comment #0)
> > The HTML 4 spec (at http://www.w3.org/TR/REC-html40/struct/links.html#h-12.4 )
> > does not say relative base URIs are illegal.
>
> href = uri [CT]
> This attribute specifies an absolute URI that acts as the base URI for
> ^^^^^^^^
> resolving relative URIs.
>
> that seems pretty clear. INVALID.
What about XHTML? Is this same bug tracked for XML under other bug number, or should I cry here?
Comment 9•16 years ago
|
||
(In reply to comment #8)
> > > The HTML 4 spec (at http://www.w3.org/TR/REC-html40/struct/links.html#h-12.4 )
> > > does not say relative base URIs are illegal.
> >
> > href = uri [CT]
> > This attribute specifies an absolute URI that acts as the base URI for
> > ^^^^^^^^
> > resolving relative URIs.
> >
> > that seems pretty clear. INVALID.
>
> What about XHTML? Is this same bug tracked for XML under other bug number, or
> should I cry here?
Can you provide some documentation about BASE@href in XHTML?
For what it's worth, I completely agree with comment 7: other browsers get it right, it is useful, and there is no benefit from following the spec strictly, but it breaks all links.
Comment 10•16 years ago
|
||
> there is no benefit from following the spec strictly
Apart from predictable behavior? I mean... that's why we have specs instead of just making stuff up.
In any case, I'm not sure what we're discussing here. The spec has been changed; we now follow the new spec. That will ship in Firefox 4.
Comment 11•16 years ago
|
||
(In reply to comment #10)
> > there is no benefit from following the spec strictly
>
> Apart from predictable behavior? I mean... that's why we have specs instead of
> just making stuff up.
>
> In any case, I'm not sure what we're discussing here. The spec has been
> changed; we now follow the new spec. That will ship in Firefox 4.
So this bug is actually fixed, right?
Keywords: html5
Resolution: INVALID → FIXED
Comment 12•16 years ago
|
||
Sort of. A different bug that was filed is fixed. This one was marked invalid at the time. Depends on how much history you want to rewrite, I guess.
Updated•7 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•