symfony/symfony — pull request #5683 by Tobion (2012-10-06 00:31:34+00:00)
Title: [Routing] fix handling of slashes and whitespace in pattern/prefix

The first commit fixes the handling of two starting slashes in the pattern. It would be confused with a network path e.g. `//domain/path` when generating a path, so should be prevented.

The second commit fixes the handling of whitespace in RouteCollection::addPrefix. It wasn't trimmed there but it is trimmed in Route::setPattern. So it can be out-of-synch between RouteCollection::getPrefix <-> Route::getPattern.