[HttpFoundation] Allow redirecting to URLs that contain a semicolon
This commit is contained in:
parent
eaca085aa4
commit
bd0637ebe4
|
@ -93,7 +93,7 @@ class RedirectResponse extends Response
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8" />
|
<meta charset="UTF-8" />
|
||||||
<meta http-equiv="refresh" content="0;url=%1$s" />
|
<meta http-equiv="refresh" content="0;url=\'%1$s\'" />
|
||||||
|
|
||||||
<title>Redirecting to %1$s</title>
|
<title>Redirecting to %1$s</title>
|
||||||
</head>
|
</head>
|
||||||
|
|
|
@ -20,10 +20,7 @@ class RedirectResponseTest extends TestCase
|
||||||
{
|
{
|
||||||
$response = new RedirectResponse('foo.bar');
|
$response = new RedirectResponse('foo.bar');
|
||||||
|
|
||||||
$this->assertEquals(1, preg_match(
|
$this->assertRegExp('#<meta http-equiv="refresh" content="\d+;url=\'foo\.bar\'" />#', preg_replace('/\s+/', ' ', $response->getContent()));
|
||||||
'#<meta http-equiv="refresh" content="\d+;url=foo\.bar" />#',
|
|
||||||
preg_replace(['/\s+/', '/\'/'], [' ', '"'], $response->getContent())
|
|
||||||
));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testRedirectResponseConstructorNullUrl()
|
public function testRedirectResponseConstructorNullUrl()
|
||||||
|
|
Reference in New Issue