idna convert the whole URI for uri's in docroot as redirect, fixes #1654
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
This commit is contained in:
@@ -67,6 +67,16 @@ class idna_convert_wrapper
|
||||
}
|
||||
}
|
||||
|
||||
public function encode_uri($to_encode)
|
||||
{
|
||||
if (version_compare("5.6.0", PHP_VERSION, ">=")) {
|
||||
return $this->_do_action('encode', $to_encode);
|
||||
} else {
|
||||
$to_encode = $this->is_utf8($to_encode) ? $to_encode : utf8_encode($to_encode);
|
||||
return $this->idna_converter->encodeUri($to_encode);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Decode a domain name, a email address or a list of one of both.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user