Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to route to non-ASCII letters? #613

Closed
Robinjoeh opened this issue Feb 26, 2022 · 2 comments
Closed

Unable to route to non-ASCII letters? #613

Robinjoeh opened this issue Feb 26, 2022 · 2 comments

Comments

@Robinjoeh
Copy link

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?

@DeveloperMarius
Copy link
Contributor

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

@Robinjoeh
Copy link
Author

Nicely done. I added urldecode() meanwhile to the route, lets see if yours get merged!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants