Skip to content

Commit

Permalink
Merge branch '4.3' into 4.4
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
nicolas-grekas committed Nov 17, 2019
2 parents a558b18 + 0ac9ebf commit 502040d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
2 changes: 1 addition & 1 deletion RedirectResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ public function setTargetUrl($url)
<html>
<head>
<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>
</head>
Expand Down
5 changes: 1 addition & 4 deletions Tests/RedirectResponseTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,7 @@ public function testGenerateMetaRedirect()
{
$response = new RedirectResponse('foo.bar');

$this->assertEquals(1, preg_match(
'#<meta http-equiv="refresh" content="\d+;url=foo\.bar" />#',
preg_replace(['/\s+/', '/\'/'], [' ', '"'], $response->getContent())
));
$this->assertRegExp('#<meta http-equiv="refresh" content="\d+;url=\'foo\.bar\'" />#', preg_replace('/\s+/', ' ', $response->getContent()));
}
public function testRedirectResponseConstructorEmptyUrl()
Expand Down

0 comments on commit 502040d

Please sign in to comment.