Skip to content

Commit 502040d

Browse files
Merge branch '4.3' into 4.4
* 4.3: [FrameworkBundle] Remove project dir from Translator cache vary scanned directories [HttpFoundation] Allow redirecting to URLs that contain a semicolon catch exceptions when using PDO directly [SecurityBundle] fix failing test
2 parents a558b18 + 0ac9ebf commit 502040d

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

RedirectResponse.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ public function setTargetUrl($url)
9898
<html>
9999
<head>
100100
<meta charset="UTF-8" />
101-
<meta http-equiv="refresh" content="0;url=%1$s" />
101+
<meta http-equiv="refresh" content="0;url=\'%1$s\'" />
102102
103103
<title>Redirecting to %1$s</title>
104104
</head>

Tests/RedirectResponseTest.php

+1-4
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,7 @@ public function testGenerateMetaRedirect()
2020
{
2121
$response = new RedirectResponse('foo.bar');
2222

23-
$this->assertEquals(1, preg_match(
24-
'#<meta http-equiv="refresh" content="\d+;url=foo\.bar" />#',
25-
preg_replace(['/\s+/', '/\'/'], [' ', '"'], $response->getContent())
26-
));
23+
$this->assertRegExp('#<meta http-equiv="refresh" content="\d+;url=\'foo\.bar\'" />#', preg_replace('/\s+/', ' ', $response->getContent()));
2724
}
2825

2926
public function testRedirectResponseConstructorEmptyUrl()

0 commit comments

Comments
 (0)