nette / routing

Nette Routing: two-ways URL conversion
https://doc.nette.org/routing
Other
230 stars 3 forks source link

Showing commas in URL parameter #14

Open korinektomas opened 7 months ago

korinektomas commented 7 months ago

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 commented 7 months ago

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