Description
Currently symfony does not allow to generate urls with encoded slash in slug. Ex:
_some_route:
path: /create/{folder}/zip
If folder
parameter value is: /home/user
, either I have to allow /
in url parameter or do parameter encoding before passing it to the UrlGenerator.
In the first case we get raw path: /create//home/user/zip
In the second case, UrlGeneretor will double encode the parameter: /create/%252Fhome%252Fuser/zip
.
But neither give desired output: /create/%2Fhome%2Fuser/zip
I saw remark in the UrlGenerator code to problems with JBOSS and Apache for url with encoded slashes (http://stackoverflow.com/questions/4069002/http-400-if-2f-part-of-get-url-in-jboss), also it looks more like a bug to me, nevertheless I think it should be handled by programmers that work with that systems, cause encoded slash is fully valid in url.
Also current approach forces to use double decoding on servers with proper handling of urls, or overriding url generator class in symfony.
I do understand that my proposal will break back-compatibility, but I think this behavior should be discussed at least for future versions.