X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=application%2FUrl.php;h=c5c7dd187bbc0d1f1f3d7aff97bbb4cfc375bb61;hb=7af9a41881ed0b9d44d18a0ce03a123a8441adf5;hp=61a30a7800972d8d8c22fdad98a4023e1c561b23;hpb=47be06098396b5eef35234b88227d64ab81bd988;p=github%2Fshaarli%2FShaarli.git diff --git a/application/Url.php b/application/Url.php index 61a30a78..c5c7dd18 100644 --- a/application/Url.php +++ b/application/Url.php @@ -62,21 +62,7 @@ function add_trailing_slash($url) { return $url . (!endsWith($url, '/') ? '/' : ''); } -/** - * Converts an URL with an IDN host to a ASCII one. - * - * @param string $url Input URL. - * - * @return string converted URL. - */ -function url_with_idn_to_ascii($url) -{ - $parts = parse_url($url); - $parts['host'] = idn_to_ascii($parts['host']); - $httpUrl = new \http\Url($parts); - return $httpUrl->toString(); -} /** * URL representation and cleanup utilities * @@ -99,6 +85,7 @@ class Url 'action_type_map=', 'fb_', 'fb=', + 'PHPSESSID=', // Scoop.it '__scoop', @@ -240,7 +227,7 @@ class Url * * @return string converted cleaned up URL. */ - public function indToAscii() + public function idnToAscii() { $out = $this->cleanup(); if (! function_exists('idn_to_ascii') || ! isset($this->parts['host'])) {