Created attachment 244139 [details] 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
This is fixed these days.