We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 43fe2b8 commit 5ccfc93Copy full SHA for 5ccfc93
interfaces/UriString.php
@@ -309,9 +309,10 @@ public static function parseNormalized(Stringable|string $uri): array
309
if ($host === $components['host']) {
310
$host = (string) preg_replace_callback(
311
'/%[0-9A-F]{2}/i',
312
- fn (array $matches): string => strtoupper($matches[0]),
+ fn (array $matches) => 1 === preg_match('/%([0-7][0-9a-f])/', $matches[0]) ? rawurldecode($matches[0]) : strtoupper($matches[0]),
313
strtolower($host)
314
);
315
+
316
if ($isSupported) {
317
$idnaHost = IdnaConverter::toAscii(rawurldecode($components['host']));
318
if (!$idnaHost->hasErrors()) {
0 commit comments