Closed
Bug 414090
Opened 17 years ago
Closed 7 years ago
document.domain's value is dependent upon whether the relevant TLD is whitelisted as Unicode-safe
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
People
(Reporter: Waldo, Assigned: Waldo)
References
Details
javascript:%20alert(document.domain)
...in the following URLs returns a punycode result in the first case and the Unicode result in the second:
http://xn--diseoweb-g3a.com.uy/
http://www.müller.de/
Whether or not we've whitelisted a TLD should not affect this value, but it does, and it makes IDN domain names harder to use. This is completely inconsistent, and we should fix this, preferably for Firefox 3 in my opinion. I'm tempted to argue for blocking, but given that we've shipped with this before I'd probably lose the argument. :-\
Bug 400552 covers a somewhat similar issue with setting document.domain.
Assignee | ||
Comment 1•17 years ago
|
||
dveditz tells me this also affects document.location (and by extension window.location) as well. Our doing this at the nsIURI/nsStandardURL level doesn't really help things. :-\
Comment 2•10 years ago
|
||
https://www.w3.org/Bugs/Public/show_bug.cgi?id=26261 on HTML to define how document.domain needs to be serialized.
Pretty sure that the others need to be serialized as ASCII per the URL Standard.
Comment 3•10 years ago
|
||
We no longer have a whitelist of TLDs. Well, we do, but we have an algorithm as well, and the whitelist is frozen.
I can't find a working domain that displays as Punycode - anyone got one?
Gerv
Comment 4•10 years ago
|
||
This is still a problem. E.g. for xn--74h.example.com.
Comment 5•10 years ago
|
||
How do you get the browser to tell you the value of document.domain in the DOM of a web page on a site which doesn't even resolve in DNS?
Anyway, I agree that document.domain should be always one or the other, not a mix.
Gerv
Assignee | ||
Comment 6•10 years ago
|
||
(In reply to Gervase Markham [:gerv] from comment #5)
> How do you get the browser to tell you the value of document.domain in the
> DOM of a web page on a site which doesn't even resolve in DNS?
Add origins to build/pgo/server-locations.txt and fire up a Mochitest browser and test there.
Comment 7•7 years ago
|
||
Implementation landed in bug 1380617 (firefox 56). Got turned on in bug 1380617 (firefox 57).
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•