routing icon indicating copy to clipboard operation
routing copied to clipboard

Showing commas in URL parameter

Open korinektomas opened this issue 1 year ago • 1 comments

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?

korinektomas avatar Dec 07 '23 20:12 korinektomas

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

dg avatar Dec 07 '23 20:12 dg