Bug 153662

Summary: setting location.pathname re-encodes pathname
Product: WebKit Reporter: Kerryck <kerryck>
Component: DOMAssignee: Nobody <webkit-unassigned>
Status: RESOLVED CONFIGURATION CHANGED    
Severity: Normal CC: achristensen, ahmad.saleem792, ap, beidson, bfulgham, cdumez, kerryck, kevcx2, rniwa, ziyingzhanginc
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Mac   
OS: OS X 10.10   
Attachments:
Description Flags
Test Case none

Description Kerryck 2016-01-29 11:41:28 PST
Created attachment 270230 [details]
Test Case

Steps to Repro: 
1. Go to https://cdn.inkling.com/safari-test/foo%20bar.html
2. Click the "Refresh Page" button which does `window.location.pathname = window.location.pathname`

Expected Behaviour
The page should be refreshed to the URL https://cdn.inkling.com/safari-test/foo%20bar.html

Actual Behaviour:
The page is refreshed to the URL https://cdn.inkling.com/safari-test/foo%2520bar.html


I assume that this started happening when https://bugs.webkit.org/show_bug.cgi?id=30225 was fixed.
Comment 1 Ziying Zhang 2016-01-29 11:49:42 PST
+1
Comment 2 Ahmad Saleem 2022-08-09 15:15:45 PDT
I am unable to reproduce this bug in Safari 15.6 on macOS 12.5 using CDN test link mentioned in the Comment 0, it shows "foo%20bar.html" in the URL bar and it is same as Chrome Canary 106 and Firefox Nightly 105 but in case of Firefox, the URL changes %20 to space.

I am going to mark this as "RESOLVED CONFIGURATION CHANGED" but if it is not fixed, please comment with updated reproducible test case. Thanks!