Unable to route to non-ASCII letters?
Robinjoeh opened this issue · comments
My route:
Router::get('/κκκκ', 'BaseController@home', ['defaultParameterRegex' => '[\w\-\p{Greek}]+']);
Yields the following:
Uncaught Pecee\SimpleRouter\Exceptions\NotFoundHttpException: Route not found: "/%CE%BA%CE%BA%CE%BA%CE%BA/"
Stack trace:
#0 /vendor/pecee/simple-router/src/Pecee/SimpleRouter/Router.php(343): Pecee\SimpleRouter\Router->routeRequest()
#1 /vendor/pecee/simple-router/src/Pecee/SimpleRouter/SimpleRouter.php(69): Pecee\SimpleRouter\Router->start()
#2 /app/Router.php(34): Pecee\SimpleRouter\SimpleRouter::start()
Is there any problem using non-ASCII letters in the router? I tried the same with a group, but unfortunately it is exactly the same result. Is the router correctly decoding the urls?
Hey,
I fixed your issue in the PR #614.
Feel free to change the affected code in your vendor files temporary until the PR is merged into the next release.
~ Marius
Nicely done. I added urldecode()
meanwhile to the route, lets see if yours get merged!