Bug 118611

Summary: location.href and document.URL incorrect when domain is non-ASCII
Product: WebKit Reporter: Boris Zbarsky <bzbarsky>
Component: DOMAssignee: Nobody <webkit-unassigned>
Status: RESOLVED CONFIGURATION CHANGED    
Severity: Normal CC: achristensen, ahmad.saleem792, ap, bfulgham, cdumez, rniwa, syoichi
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
URL: http://ит-7.рф/test.html

Description Boris Zbarsky 2013-07-12 11:35:25 PDT
STEPS TO REPRODUCE:

1. Load http://ит-7.рф/test.html
2. Examine window.location.href
3. Examine document.URL

EXPECTED RESULT: Both location.href and document.URL show the Unicode string, not punycode.

ACTUAL RESULT: Punycode is shown.

ADDITIONAL INFO:

Relevant spec at http://www.whatwg.org/specs/web-apps/current-work/multipage/history.html#set-the-document%27s-address 

Relevant comments from spec editor at http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2013-July/040031.html
Comment 1 Ahmad Saleem 2022-08-01 12:37:29 PDT
Wayback archive - https://web.archive.org/web/20140805202228/http://ит-7.рф/test.html

*** Firefox Nightly 105 ***

document.URL

http://%D0%B8%D1%82-7.%D1%80%D1%84/test.html

window.location.href (Removed Wayback archive link portion)

http://%D0%B8%D1%82-7.%D1%80%D1%84/test.html

*** Safari 15.6 ***

document.URL

http://%D0%B8%D1%82-7.%D1%80%D1%84/test.html

window.location.href (Removed Wayback archive link portion)

http://%D0%B8%D1%82-7.%D1%80%D1%84/test.html

*** Chrome Canary 105 ***

document.URL

http://%D0%B8%D1%82-7.%D1%80%D1%84/test.html

window.location.href (Removed Wayback archive link portion)

http://%D0%B8%D1%82-7.%D1%80%D1%84/test.html

________

All browsers are showing same but we have specs link in the Comment 0 as well. I just wanted to share updated results, it might be faulty due to being done on wayback archive. Appreciate if someone can look, if it is still a bug and not aligned with web-spec then moving to Radar or getting this fixed would be great. If web-spec changed and all browsers are fine then it can be marked as "RESOLVED INVALID". Thanks!
Comment 2 Alexey Proskuryakov 2022-08-01 12:57:33 PDT
This cannot be tested via Wayback Machine, we'll need to test on a different domain.
Comment 3 Ryosuke Niwa 2022-08-01 21:15:27 PDT
I can reproduce this on https://日本語.jp.
Comment 4 Chris Dumez 2022-08-04 08:53:29 PDT
I have just tried with https://日本語.jp/ and window.location.href & document.URL both show punnycode in Safari & Chrome & Firefox.

All browsers are aligned here so I don't think we should change?
Comment 5 Ryosuke Niwa 2022-08-04 10:36:24 PDT
(In reply to Chris Dumez from comment #4)
> I have just tried with https://日本語.jp/ and window.location.href &
> document.URL both show punnycode in Safari & Chrome & Firefox.
> 
> All browsers are aligned here so I don't think we should change?

Sounds like config changed to me.