diff options
Diffstat (limited to 'application/Url.php')
-rw-r--r-- | application/Url.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/application/Url.php b/application/Url.php index b3759377..6b9870f0 100644 --- a/application/Url.php +++ b/application/Url.php | |||
@@ -81,7 +81,7 @@ function whitelist_protocols($url, $protocols) | |||
81 | // Protocol not allowed: we remove it and replace it with http | 81 | // Protocol not allowed: we remove it and replace it with http |
82 | if ($protocol === 1 && ! in_array($match[1], $protocols)) { | 82 | if ($protocol === 1 && ! in_array($match[1], $protocols)) { |
83 | $url = str_replace($match[0], 'http://', $url); | 83 | $url = str_replace($match[0], 'http://', $url); |
84 | } else if ($protocol !== 1) { | 84 | } elseif ($protocol !== 1) { |
85 | $url = 'http://' . $url; | 85 | $url = 'http://' . $url; |
86 | } | 86 | } |
87 | return $url; | 87 | return $url; |
@@ -260,7 +260,7 @@ class Url | |||
260 | if (! function_exists('idn_to_ascii') || ! isset($this->parts['host'])) { | 260 | if (! function_exists('idn_to_ascii') || ! isset($this->parts['host'])) { |
261 | return $out; | 261 | return $out; |
262 | } | 262 | } |
263 | $asciiHost = idn_to_ascii($this->parts['host']); | 263 | $asciiHost = idn_to_ascii($this->parts['host'], 0, INTL_IDNA_VARIANT_UTS46); |
264 | return str_replace($this->parts['host'], $asciiHost, $out); | 264 | return str_replace($this->parts['host'], $asciiHost, $out); |
265 | } | 265 | } |
266 | 266 | ||