url-normalizer icon indicating copy to clipboard operation
url-normalizer copied to clipboard

Punycode support

Open glenscott opened this issue 9 years ago • 0 comments

I have had some problems with urls that have been copied from browser bars. When the real url is in punycode the browser bar shows the UTF-8 representation which is then copied causing issues.

I have a suggested change to function mbParseUrl()

After $encodedParts = parse_url($encodedURL); insert

       // Fix for IDN based URLs that have been copied from browser bars in UTF-8 (TRS)
    //  Convert back to punycode
       $temp_host = idn_to_ascii($encodedParts['host']);
       if (!empty($temp_host)) $encodedParts['host'] = $temp_host;

glenscott avatar Jan 04 '16 11:01 glenscott