[Webkit-unassigned] [Bug 158869] New: URL hash setter does not remove fragment identifier if argument is an empty string

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Jun 17 04:59:27 PDT 2016


https://bugs.webkit.org/show_bug.cgi?id=158869

            Bug ID: 158869
           Summary: URL hash setter does not remove fragment identifier if
                    argument is an empty string
    Classification: Unclassified
           Product: WebKit
           Version: Safari 9
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: HTML DOM
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: robertknight at gmail.com
                CC: cdumez at apple.com

According to the spec for the `URL.hash` setter in https://url.spec.whatwg.org/#urlutils-members , assigning an empty string to a URL's hash should remove the fragment identifier. In WebKit however it sets it to an empty string. The result is that the following will produce a 'http://example.com/' in Chrome/Firefox but 'http://example.com/#' in Safari.

var url = new URL('http://example.com');
url.hash = '';
console.log(url.toString());

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20160617/b770c030/attachment.html>


More information about the webkit-unassigned mailing list