Closed Bug 743488 Opened 12 years ago Closed 11 years ago

IDN: window.location.href should return punycode (and not the UTF-8 code)

Categories

(Core :: DOM: Core & HTML, defect)

11 Branch
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 720331

People

(Reporter: xn--mlform-iua, Unassigned)

Details

(Keywords: dom0, Whiteboard: [bugday-20131002])

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:11.0) Gecko/20100101 Firefox/11.0
Build ID: 20120312181643

Steps to reproduce:

Added a Disqus commentent code for a page at <http://målform.no>.



Actual results:

After a long while, I was told that the comments did not load. When I checked it out, it turned out that it worked in Safari/Chrome (Webkit) and Opera, but no in Firefox and IE8.

This issue turned out to be with non-ASCII URL values:  
http://docs.disqus.com/help/83/#article
Namely: Because my page did not define a non-ASCII variable for the  disqus_url variable (the page URL),  the script instead picked the value of window.location.href. However, it turned out that Webkit returned
the puny code : <http://xn--mlform-iua.no>. Whereas Firefox returned <http://målform.no>.




Expected results:

window.location.href should return the puny code.
Hardware: Other → All
OS: Mac OS X → All
Keywords: dom0
(In reply to Leif Halvard Silli from comment #0)

> Namely: Because my page did not define a non-ASCII variable

Typo! Meant: Because my page did not define a _ASCII_ variable.
I can confirm. This bug has been getting on my nerve for a day now.
confirmation.

it behaves buffy in google analatics - there is problem using default ga js code: not registering pageviews due to sending utf code to ga. 

workaround: use explicit : _setDomainName(<punycode>)
Component: Untriaged → DOM
Product: Firefox → Core
Whiteboard: [bugday-20131002]
We're doing the right thing per current spec; WebKit gets it wrong.  See also discussion in bug 852796.
Status: UNCONFIRMED → RESOLVED
Closed: 11 years ago
Resolution: --- → DUPLICATE
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.