Skip to content

Commit

Permalink
route clean
Browse files Browse the repository at this point in the history
  • Loading branch information
asika32764 committed Mar 10, 2024
1 parent f56ba0c commit c7f71f3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Core/Router/Route.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
use Windwalker\Core\Application\ApplicationInterface;
use Windwalker\DI\Definition\ObjectBuilderDefinition;
use Windwalker\Uri\Uri;
use Windwalker\Uri\UriNormalizer;
use Windwalker\Utilities\Classes\FlowControlTrait;

/**
Expand Down Expand Up @@ -295,7 +296,7 @@ public function compile(): Route
*/
public static function sanitize(string $pattern): string
{
return '/' . trim(parse_url($pattern, PHP_URL_PATH), ' /');
return '/' . trim(parse_url(UriNormalizer::cleanPath($pattern), PHP_URL_PATH), ' /');
}

/**
Expand Down

0 comments on commit c7f71f3

Please sign in to comment.