[Routing] Revert to rawurlencode + whitelisting of '/'
This commit is contained in:
parent
2ec4b04547
commit
ac1448f573
@ -28,11 +28,8 @@ use Symfony\Component\Routing\Exception\MissingMandatoryParametersException;
|
||||
class UrlGenerator implements UrlGeneratorInterface
|
||||
{
|
||||
protected $context;
|
||||
protected $escapedChars = array(
|
||||
'%' => '%25',
|
||||
'+' => '%2B',
|
||||
'#' => '%23',
|
||||
'?' => '%3F',
|
||||
protected $decodedChars = array(
|
||||
'%2F' => '/',
|
||||
);
|
||||
|
||||
private $routes;
|
||||
@ -131,7 +128,7 @@ class UrlGenerator implements UrlGeneratorInterface
|
||||
}
|
||||
|
||||
if (!$isEmpty || !$optional) {
|
||||
$url = $token[1].strtr($tparams[$token[3]], $this->escapedChars).$url;
|
||||
$url = $token[1].strtr(rawurlencode($tparams[$token[3]]), $this->decodedChars).$url;
|
||||
}
|
||||
|
||||
$optional = false;
|
||||
|
Reference in New Issue
Block a user