<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>10894</bug_id>
          
          <creation_ts>2010-09-30 19:38:32 +0000</creation_ts>
          <short_desc>Reflecting an IDL attribute with a URL should try to canonicalize whatever value is set</short_desc>
          <delta_ts>2012-12-21 14:36:46 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WHATWG</product>
          <component>URL</component>
          <version>unspecified</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc>http://dev.w3.org/html5/spec/common-dom-interfaces.html#reflecting-content-attributes-in-idl-attributes</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P3</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>Unsorted</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Adrian Bateman [MSFT]">adrianba</reporter>
          <assigned_to name="Anne">annevk</assigned_to>
          <cc>annevk</cc>
    
    <cc>erik.arvidsson</cc>
    
    <cc>ian</cc>
    
    <cc>mike</cc>
    
    <cc>public-html-admin</cc>
    
    <cc>public-html-wg-issue-tracking</cc>
    
    <cc>public-webapps</cc>
          
          <qa_contact>sideshowbarker+urlspec</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>40277</commentid>
    <comment_count>0</comment_count>
      <attachid>918</attachid>
    <who name="Adrian Bateman [MSFT]">adrianba</who>
    <bug_when>2010-09-30 19:38:32 +0000</bug_when>
    <thetext>Created attachment 918
Test case

The spec says: &quot;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&quot;

None of the major browsers return the empty string.

Proposed language:
&quot;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&quot;

In other words, store whatever value is supplied, and then try to canonicalize the URL relative to that.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>40342</commentid>
    <comment_count>1</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2010-10-01 00:08:46 +0000</bug_when>
    <thetext>This is about what to do with invalid input. E.g. &lt;a href=&quot;http://a b/&quot;&gt;. That would fail to resolve. So unless the URL resolving algorithm always resolves, we need to handle the case where it fails, somehow.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>40989</commentid>
    <comment_count>2</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2010-10-12 07:29:32 +0000</bug_when>
    <thetext>EDITOR&apos;S RESPONSE: This is an Editor&apos;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&apos;ll mark this REMIND so I can check this once Adam&apos;s work is done.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>74779</commentid>
    <comment_count>3</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2012-09-28 10:47:41 +0000</bug_when>
    <thetext>http://url.spec.whatwg.org/ now defines this. HTML just needs to be updated to refer to it.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>918</attachid>
            <date>2010-09-30 19:38:32 +0000</date>
            <delta_ts>2010-09-30 19:38:32 +0000</delta_ts>
            <desc>Test case</desc>
            <filename>invalid-src.html</filename>
            <type>text/html</type>
            <size>618</size>
            <attacher name="Adrian Bateman [MSFT]">adrianba</attacher>
            
              <data encoding="base64">PCFET0NUWVBFIEhUTUw+DQo8aHRtbD4NCgk8aGVhZD4NCgkJPHRpdGxlPkludmFsaWQgVVJMIHRl
c3QgZm9yIG1lZGlhIGVsZW1lbnRzPC90aXRsZT4NCgk8L2hlYWQ+DQoJPGJvZHk+DQoJCTxwPlRl
c3QgcGFzc2VzIGlmIHRoZSB0ZXh0ICJQQVNTIiBhcHBlYXJzIGJlbG93LjwvcD4NCgkJPGltZyBp
ZD0iaW1hZ2UiPg0KICAgICAgICA8YnI+DQoJCTxzY3JpcHQgdHlwZT0idGV4dC9qYXZhc2NyaXB0
Ij4NCgkJCQ0KCQkJdGVzdEVsZW0gPSBkb2N1bWVudC5nZXRFbGVtZW50QnlJZCgiaW1hZ2UiKTsN
CgkJCXRyeQ0KCQkJew0KCQkJCXRlc3RFbGVtLnNyYyA9ICI6Ojo6OjovcGF0aCI7DQoJCQkJaWYg
KHRlc3RFbGVtLnNyYyA9PSAiIikNCgkJCQl7DQoJCQkJCWRvY3VtZW50LndyaXRlKCJQQVNTIikN
CgkJCQl9DQoJCQkJZWxzZQ0KCQkJCXsNCgkJCQkJZG9jdW1lbnQud3JpdGUoIkZBSUw6IHNyYyBz
ZXQgdG8gaW52YWxpZCBVUkwgWyIgKyB0ZXN0RWxlbS5zcmMgKyAiXSIpOw0KCQkJCX0NCgkJCX0N
CgkJCWNhdGNoIChleCkNCgkJCXsNCgkJCQlkb2N1bWVudC53cml0ZSgiRkFJTDogRXhjZXB0aW9u
IHRocm93biIpOw0KCQkJfQ0KCQk8L3NjcmlwdD4NCgk8L2JvZHk+DQo8L2h0bWw+
</data>

          </attachment>
      

    </bug>

</bugzilla>