[['fixUri', 500]]]; } public function fixUri(CompleteEvent $event) { $response = $event->getResponse(); if (!$response->hasHeader('Location')) { return; } $uri = $response->getHeader('Location'); if (false === ($badParameter = strstr($uri, 'retour=http://'))) { return; } $response->setHeader('Location', str_replace($badParameter, urlencode($badParameter), $uri)); } }