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 10894 - Reflecting an IDL attribute with a URL should try to canonicalize whatever value is set
Summary: Reflecting an IDL attribute with a URL should try to canonicalize whatever va...
Status: RESOLVED FIXED
Alias: None
Product: WHATWG
Classification: Unclassified
Component: URL (show other bugs)
Version: unspecified
Hardware: All All
: P3 normal
Target Milestone: Unsorted
Assignee: Anne
QA Contact: sideshowbarker+urlspec
URL: http://dev.w3.org/html5/spec/common-d...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-30 19:38 UTC by Adrian Bateman [MSFT]
Modified: 2012-12-21 14:36 UTC (History)
7 users (show)

See Also:


Attachments
Test case (618 bytes, text/html)
2010-09-30 19:38 UTC, Adrian Bateman [MSFT]
Details

Description Adrian Bateman [MSFT] 2010-09-30 19:38:32 UTC
Created attachment 918 [details]
Test case

The spec says: "If a reflecting IDL attribute is a DOMString attribute whose content attribute is defined to contain a URL, then on getting, the IDL attribute must resolve the value of the content attribute relative to the element and return the resulting absolute URL if that was successful, or the empty string otherwise"

None of the major browsers return the empty string.

Proposed language:
"If a reflecting IDL attribute is a DOMString attribute whose content attribute is defined to contain a URL, then on getting, the IDL attribute must resolve the value of the content attribute relative to the element and return the resulting absolute URL"

In other words, store whatever value is supplied, and then try to canonicalize the URL relative to that.
Comment 1 Anne 2010-10-01 00:08:46 UTC
This is about what to do with invalid input. E.g. <a href="http://a b/">. That would fail to resolve. So unless the URL resolving algorithm always resolves, we need to handle the case where it fails, somehow.
Comment 2 Ian 'Hixie' Hickson 2010-10-12 07:29:32 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: Rejected
Change Description: no spec change
Rationale: What Anne said. So long as the resolving algorithm can fail, then we need to define what happens when it fails.

Adam is currently working on rewriting that algorithm. If he defines it in a way that it never fails, then I can strip this part of the spec. In the meantime... I'll mark this REMIND so I can check this once Adam's work is done.
Comment 3 Anne 2012-09-28 10:47:41 UTC
http://url.spec.whatwg.org/ now defines this. HTML just needs to be updated to refer to it.