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

Showing commas in URL parameter #14

Closed
korinektomas opened this issue Dec 7, 2023 · 1 comment
Closed

Showing commas in URL parameter #14

korinektomas opened this issue Dec 7, 2023 · 1 comment

Comments

@korinektomas
Copy link

If a variable containing commas is used in the URL, these commas are changed to the encoded version. For example this:

$router->withModule('Front')->addRoute('/tags[:<slugs>]', [
	'presenter' => 'Tag',
	'action' => 'default',
]);

with string variable "music,sports" generates this: www.example.com/tags:music%2Csports

It would be great to be able to keep the commas in their original form and make a nice URL like: www.example.com/tags:music,sports

Would it be please possible to change the router accordingly?

@dg
Copy link
Member

dg commented Dec 7, 2023

Reference: https://datatracker.ietf.org/doc/html/rfc3986

segment can contains characters ALPHA / DIGIT / "-" / "." / "_" / "~" / "!" / "$" / "&" / "'" / "(" / ")" / "*" / "+" / "," / ";" / "=" / ":" / "@"

@dg dg closed this as completed in 5b0782d Nov 4, 2024
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