Closed Bug 496850 Opened 16 years ago Closed 16 years ago

<base href="//x/y"> should assume current scheme (e.g. http:)

Categories

(Core :: DOM: HTML Parser, defect)

defect
Not set
minor

Tracking

()

RESOLVED DUPLICATE of bug 249881

People

(Reporter: greenreaper, Unassigned)

References

()

Details

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.1pre) Gecko/20090607 Shiretoko/3.5pre Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.1pre) Gecko/20090607 Shiretoko/3.5pre When a <BASE> element specified within a HTML document contains a relative URI which lacks a header, it appears to be ignored. This leads to problems when relative URIs are used as hrefs within the page. The HTML specification requires the URI specified within BASE to be absolute (http://www.w3.org/TR/html401/struct/links.html#edef-BASE). However, current versions of Google Chrome, Internet Explorer, Opera and Lynx accept such URLs and do the "most sensible thing" by using the specified BASE URI with the current page's scheme. Lynx throws up a warning, but allows it. I think Firefox should allow it, too. Reproducible: Always Steps to Reproduce: 1. Write a page with a non-absolute URI pointing to a different website as BASE (e.g. "//ru.wikifur.com/wiki/") 2. Add links with relative hrefs to the page (e.g. "Ursa_Major_Awards") 3. Try to follow those links Actual Results: Firefox attempts to load the page "http://stats.wikifur.com/EN/Ursa_Major_Awards", which does not exist. Expected Results: While it is free to do what it likes, as relative <base> URIs are out of spec, Firefox *could* have interpreted the BASE URI as far as possible, adding the current page's scheme. This would better reflect the intent of the author.
Component: General → HTML: Parser
Product: Firefox → Core
QA Contact: general → parser
Status: UNCONFIRMED → RESOLVED
Closed: 16 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.