[Webkit-unassigned] [Bug 140174] New: DOM URL pathname setter double encodes entities

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jan 6 21:13:51 PST 2015


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

            Bug ID: 140174
           Summary: DOM URL pathname setter double encodes entities
    Classification: Unclassified
           Product: WebKit
           Version: 528+ (Nightly build)
          Hardware: Macintosh
                OS: Mac OS X 10.10
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: HTML DOM
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: josh at joshpeek.com
                CC: annevk at annevk.nl

Created attachment 244139
  --> https://bugs.webkit.org/attachment.cgi?id=244139&action=review
URL pathname test

The URL pathname setter incorrectly re-encodes the target value before setting it as the pathname attribute. The getter always correctly returns the undecoded pathname.

  var url = new URL("http://example.com/")
  url.pathname = "foo%20bar"
  url.pathname // "/foo%2520bar"
  url.href // "http://example.com/foo%2520bar"

This breaks the ability to reset pathname with the value from its getter.

  var url = new URL("http://example.com/foo%20bar")
  url.pathname // "/foo%20bar"
  url.pathname = url.pathname + "/123"
  url.pathname // "/foo%2520bar/123"

I don't think the pathname setter is correctly performing the "Basic URL parse" step in https://url.spec.whatwg.org/#dom-urlutils-pathname

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20150107/532bacb0/attachment-0002.html>


More information about the webkit-unassigned mailing list