8000 [Routing] UrlGenerator fails to encode static text · Issue #4166 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content
[Routing] UrlGenerator fails to encode static text #4166
Closed
@Tobion

Description

@Tobion

Currently only the variables get url encoded but in fact all segments must be url encoded, i.e. static text too.
Otherwise the generated URL contains invalid chars and does not conform to the RFC.

Current situation:

$routes = $this->getRoutes('test', new Route('/Жени/{slug1}'));
$this->assertEquals('/app.php/Жени/%D0%96%D0%B5%D0%BD%D0%B8', $this->getGenerator($routes)->generate('test', array('slug1' => 'Жени')));

Should be:

$this->assertEquals('/app.php/%D0%96%D0%B5%D0%BD%D0%B8/%D0%96%D0%B5%D0%BD%D0%B8', $this->getGenerator($routes)->generate('test', array('slug1' => 'Жени')));

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0