Re:If your code accepts URIs as input, filter out “file://”
by germanier on Monday September 12, 2016 @09:24AM
(#12479423)
I just tried doing that with a few domain names containing an umlaut (äöü) and every single time that letter was copied into the clipboard (even though behind the scenes at the request level it would have been encoded). This is what I expect as a regular user. They don't want to deal with encoded, unreadable URLs.
[ Parent
| on HN ]
Re:If your code accepts URIs as input, filter out “file://”
by Symbiote on Monday September 12, 2016 @10:29AM
(#12479930)
I tried with http://њњњ.срб , which Firefox copies correctly, but Chromium copies as http://xn--g2aaa.xn--90a3ac/ — not very useful.
This is a different mechanism to the path part, where both Firefox and Chromium give https://ru.wikipedia.org/wiki/%D0%A0%D0%BE%D1%81%D1%81%D0%B8... rather than the readable https://ru.wikipedia.org/wiki/Россия
Re:If your code accepts URIs as input, filter out “file://”
by rzzzt on Monday September 12, 2016 @03:11PM
(#12482719)
The two methods are punycode [1] and percent encoding [2].
Re:If your code accepts URIs as input, filter out “file://”
by Dylan16807 on Monday September 12, 2016 @01:46PM
(#12481891)
If you select the entire URL bar, you get the encoded form. If you leave off the protocol, or just the h, you get it unencoded.