I compared the resulting strings and it was correct for me, but not if that's true for every case. If not, we could include a [punycode library][1] and replace the host from `window.location.href` to ensure consistency between browsers (I tried that first), but the above seemed to be a better alternative.

[1]: https://github.com/bestiejs/punycode.js