This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 10984 - HTMLBaseElement.href reflects incorrectly
Summary: HTMLBaseElement.href reflects incorrectly
Status: RESOLVED FIXED
Alias: None
Product: HTML WG
Classification: Unclassified
Component: LC1 HTML5 spec (show other bugs)
Version: unspecified
Hardware: PC All
: P2 normal
Target Milestone: ---
Assignee: Ian 'Hixie' Hickson
QA Contact: HTML WG Bugzilla archive list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-06 05:53 UTC by Jonas Sicking (Not reading bugmail)
Modified: 2011-08-04 05:35 UTC (History)
4 users (show)

See Also:


Attachments

Description Jonas Sicking (Not reading bugmail) 2010-10-06 05:53:27 UTC
Consider a document located at uri http://example.com/index.html with the following contents:

<html>
  <head>
    <title>hi</title>
    <base href="bar/">
  </head>
  <body>...</body>
</html>

If one were to get the HTMLBaseElement.href property of the <base> element, the expected value would be "http://example.com/bar/". However currently the spec defines that the returned value should be "http://example.com/bar/bar/".

This is because the .href property is defined to be a reflected property. Reflected properties that contain a URL are defined to be resolved against the element. However the base url of the <base> element is the same as for all other elements in this document "http://example.com/bar/". Resolving the value of the attribute, "bar/" against the elements base "http://example.com/bar/" yields "http://example.com/bar/bar/".

This was discovered in
https://bugzilla.mozilla.org/show_bug.cgi?id=600809
Comment 1 Ian 'Hixie' Hickson 2010-10-12 08:34:58 UTC
EDITOR'S RESPONSE: This is an Editor's Response to your comment. If you are satisfied with this response, please change the state of this bug to CLOSED. If you have additional information and would like the editor to reconsider, please reopen this bug. If you would like to escalate the issue to the full HTML Working Group, please add the TrackerRequest keyword to this bug, and suggest title and text for the tracker issue; or you may create a tracker issue yourself, if you are able to do so. For more details, see this document:
   http://dev.w3.org/html5/decision-policy/decision-policy.html

Status: Accepted
Change Description: see diff given below
Rationale: Concurred with reporter's comments.

I love this bug.
Comment 2 contributor 2010-10-12 08:37:12 UTC
Checked in as WHATWG revision r5608.
Check-in comment: base.href shouldn't resolve twice...
http://html5.org/tools/web-apps-tracker?from=5607&to=5608
Comment 3 Michael[tm] Smith 2011-08-04 05:35:36 UTC
mass-move component to LC1