<?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>10410</bug_id>
          
          <creation_ts>2010-08-20 17:34:41 +0000</creation_ts>
          <short_desc>On getting, should the UA percent-decode document.location.hash?  It&apos;s not clear.</short_desc>
          <delta_ts>2010-10-07 19:48:45 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>HTML WG</product>
          <component>pre-LC1 HTML5 spec (editor: Ian Hickson)</component>
          <version>unspecified</version>
          <rep_platform>Other</rep_platform>
          <op_sys>other</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>NEEDSINFO</resolution>
          
          
          <bug_file_loc>http://www.whatwg.org/specs/web-apps/current-work/#interfaces-for-url-manipulation</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P3</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>contributor</reporter>
          <assigned_to name="Ian &apos;Hixie&apos; Hickson">ian</assigned_to>
          <cc>ayg</cc>
    
    <cc>hsivonen</cc>
    
    <cc>ian</cc>
    
    <cc>mike</cc>
    
    <cc>public-html-admin</cc>
    
    <cc>public-html-wg-issue-tracking</cc>
    
    <cc>w3c</cc>
          
          <qa_contact name="HTML WG Bugzilla archive list">public-html-bugzilla</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>37670</commentid>
    <comment_count>0</comment_count>
    <who name="">contributor</who>
    <bug_when>2010-08-20 17:34:41 +0000</bug_when>
    <thetext>Section: http://www.whatwg.org/specs/web-apps/current-work/#interfaces-for-url-manipulation

Comment:
On getting, should the UA percent-decode?  Firefox seems to say yes,
Chrome/Opera no, at least for the hash.  Test case (save and visit with some
percent-encoded fragment): data:text/html,&lt;!doctype
html&gt;&lt;script&gt;alert(document.location.hash);&lt;/script&gt;

Posted from: 68.175.61.233</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>37832</commentid>
    <comment_count>1</comment_count>
    <who name="Henri Sivonen">hsivonen</who>
    <bug_when>2010-08-25 12:05:54 +0000</bug_when>
    <thetext>Note that Gecko is buggy here https://bugzilla.mozilla.org/show_bug.cgi?id=582361 and has a temporary workaround for Firefox 4, since the real fix didn&apos;t fit in the release schedule.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>39834</commentid>
    <comment_count>2</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2010-09-28 23:22:48 +0000</bug_when>
    <thetext>Is this relating just to the behaviour of location.hash and HTMLAnchorElement.hash, or is this relating to UA behaviour for jumping to the fragid? The UA behaviour is quite complex, and described here:

   http://www.whatwg.org/specs/web-apps/current-work/complete.html#the-indicated-part-of-the-document

Per spec, there&apos;s nothing to decode, as described here:

   http://www.whatwg.org/specs/web-apps/current-work/complete.html#dom-uda-hash

I can add an example to the table below that if that would help.

cc&apos;ing Adam as he might be respeccing the API here into some other document that HTML will then reference.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>40011</commentid>
    <comment_count>3</comment_count>
    <who name="Aryeh Gregor">ayg</who>
    <bug_when>2010-09-29 20:31:32 +0000</bug_when>
    <thetext>I&apos;m talking only about the behavior in JavaScript.  If I navigate to a URL ending with &quot;#%3F&quot;, for instance, then should document.location.hash be equal to &quot;%3F&quot; or &quot;?&quot;?  The same question can be asked for anchors, sure.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>40050</commentid>
    <comment_count>4</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2010-09-30 04:15:48 +0000</bug_when>
    <thetext>&quot;#%3F&quot; seems to be the answer per spec now, but I&apos;ll defer to Adam.

If &quot;#%3F&quot; is the right answer, does the spec need an example to show this, or is it in fact ambiguous? If the latter, what text should be clarified?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>40059</commentid>
    <comment_count>5</comment_count>
    <who name="Adam Barth">w3c</who>
    <bug_when>2010-09-30 06:54:27 +0000</bug_when>
    <thetext>&gt; &quot;#%3F&quot; seems to be the answer per spec now, but I&apos;ll defer to Adam.

I have data on all this stuff, but I haven&apos;t paged it into memory recently.  Here&apos;s a test that covers this case:

http://trac.webkit.org/export/LATEST/trunk/LayoutTests/fast/url/segments.html

Chrome:
PASS segments(&apos;http://foo/path;a??e#f#g&apos;) is &apos;[&quot;http:&quot;,&quot;foo&quot;,&quot;0&quot;,&quot;/path;a&quot;,&quot;??e&quot;,&quot;#f#g&quot;]&apos;

Safari:
FAIL segments(&apos;http://foo/path;a??e#f#g&apos;) should be [&quot;http:&quot;,&quot;foo&quot;,&quot;0&quot;,&quot;/path;a&quot;,&quot;??e&quot;,&quot;#f#g&quot;]. Was [&quot;http:&quot;,&quot;foo&quot;,&quot;0&quot;,&quot;/path;a&quot;,&quot;??e&quot;,&quot;#f%23g&quot;].

Firefox:
FAIL segments(&apos;http://foo/path;a??e#f#g&apos;) should be [&quot;http:&quot;,&quot;foo&quot;,&quot;0&quot;,&quot;/path;a&quot;,&quot;??e&quot;,&quot;#f#g&quot;]. Was [&quot;http:&quot;,&quot;foo&quot;,&quot;&quot;,&quot;/path&quot;,&quot;??e&quot;,&quot;#f#g&quot;].

Opera:
FAIL segments(&apos;http://foo/path;a??e#f#g&apos;) should be [&quot;http:&quot;,&quot;foo&quot;,&quot;0&quot;,&quot;/path;a&quot;,&quot;??e&quot;,&quot;#f#g&quot;]. Was [&quot;http:&quot;,&quot;foo&quot;,&quot;80&quot;,&quot;/path;a&quot;,&quot;??e&quot;,&quot;#f#g&quot;].

IE: (untested)

(Note that &quot;PASS&quot; is arbitrarily set to whatever Chrome does because Brett picked these test cases.)

Generally, this stuff is a mess.  We&apos;d want to test IE to be sure, but it looks like the &quot;right&quot; answer here is &quot;#f#g&quot;.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>40793</commentid>
    <comment_count>6</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2010-10-07 19:20:07 +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: Accepted
Change Description: see diff given below
Rationale: I&apos;ve added an example, but not changed the normative reqs, since they seem clear and correct.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>40794</commentid>
    <comment_count>7</comment_count>
    <who name="">contributor</who>
    <bug_when>2010-10-07 19:21:50 +0000</bug_when>
    <thetext>Checked in as WHATWG revision r5588.
Check-in comment: add more uda examples
http://html5.org/tools/web-apps-tracker?from=5587&amp;to=5588</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>40800</commentid>
    <comment_count>8</comment_count>
    <who name="Aryeh Gregor">ayg</who>
    <bug_when>2010-10-07 19:48:45 +0000</bug_when>
    <thetext>I have no real opinion on what the correct behavior is, but the example makes it clear now, so I have no further objections here.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>