Movwe the conversion after the cleaning
This commit is contained in:
parent
ffb8491c3f
commit
34f594137e
|
@ -65,11 +65,11 @@ class Probe
|
||||||
*/
|
*/
|
||||||
public static function cleanURI(string $rawUri): string
|
public static function cleanURI(string $rawUri): string
|
||||||
{
|
{
|
||||||
$rawUri = Network::convertToIdn($rawUri);
|
|
||||||
|
|
||||||
// At first remove leading and trailing junk
|
// At first remove leading and trailing junk
|
||||||
$rawUri = trim($rawUri, "@#?:/ \t\n\r\0\x0B");
|
$rawUri = trim($rawUri, "@#?:/ \t\n\r\0\x0B");
|
||||||
|
|
||||||
|
$rawUri = Network::convertToIdn($rawUri);
|
||||||
|
|
||||||
$uri = new Uri($rawUri);
|
$uri = new Uri($rawUri);
|
||||||
if (!$uri->getScheme()) {
|
if (!$uri->getScheme()) {
|
||||||
return $uri->__toString();
|
return $uri->__toString();
|
||||||
|
|
Loading…
Reference in New Issue
Block a user