Skip to content

[Routing] UrlGenerator fails to encode static text #4166

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Tobion opened this issue Apr 30, 2012 · 2 comments
Closed

[Routing] UrlGenerator fails to encode static text #4166

Tobion opened this issue Apr 30, 2012 · 2 comments
Milestone

Comments

@Tobion
Copy link
Contributor

Tobion commented Apr 30, 2012

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' => 'Жени')));
@Tobion
Copy link
Contributor Author

Tobion commented Apr 30, 2012

Ref: #3629

@dlsniper
Copy link
Contributor

dlsniper commented May 1, 2012

I've added a fix for this in #3629

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants