Skip to content

Commit e667a9e

Browse files
committed
Merge branch '2.4' into 2.5
* 2.4: (39 commits) [Form] Fix PHPDoc for builder setData methods The underlying data variable is typed as mixed whereas the methods paramers where typed as array. fixed CS [Intl] Improved bundle reader implementations [Console] guarded against invalid aliases switch before_script to before_install and script to install fixed typo [HttpFoundation] Request - URI - comment improvements [Validator] The ratio of the ImageValidator is rounded to two decimals now [Security] Added more tests remove `service` parameter type from XSD [Intl] Added exception handler to command line scripts [Intl] Fixed a few bugs in TextBundleWriter [Intl] Updated icu.ini up to ICU 53 [Intl] Removed non-working $fallback argument from ArrayAccessibleResourceBundle Use separated function to resolve command and related arguments [SwiftmailerBridge] Bump allowed versions of swiftmailer [FrameworkBundle] Remove invalid markup [Intl] Added "internal" tag to all classes under Symfony\Component\Intl\ResourceBundle Remove routes for removed WebProfiler actions [Security] Fix usage of unexistent method in DoctrineAclCache. ... Conflicts: .travis.yml src/Symfony/Bundle/FrameworkBundle/Command/ServerRunCommand.php src/Symfony/Component/HttpKernel/Kernel.php src/Symfony/Component/Process/PhpExecutableFinder.php
2 parents 18bce9a + 6edad2e commit e667a9e

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

HttpCache/Esi.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -236,9 +236,9 @@ private function handleEsiIncludeTag($attributes)
236236
throw new \RuntimeException('Unable to process an ESI tag without a "src" attribute.');
237237
}
238238

239-
return sprintf('<?php echo $this->esi->handle($this, \'%s\', \'%s\', %s) ?>'."\n",
240-
$options['src'],
241-
isset($options['alt']) ? $options['alt'] : null,
239+
return sprintf('<?php echo $this->esi->handle($this, %s, %s, %s) ?>'."\n",
240+
var_export($options['src'], true),
241+
var_export(isset($options['alt']) ? $options['alt'] : '', true),
242242
isset($options['onerror']) && 'continue' == $options['onerror'] ? 'true' : 'false'
243243
);
244244
}

Tests/HttpCache/EsiTest.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,11 @@ public function testProcess()
103103
$this->assertEquals('foo <?php echo $this->esi->handle($this, \'...\', \'alt\', true) ?>'."\n", $response->getContent());
104104
$this->assertEquals('ESI', $response->headers->get('x-body-eval'));
105105

106+
$response = new Response('foo <esi:comment text="some comment" /><esi:include src="foo\'" alt="bar\'" onerror="continue" />');
107+
$esi->process($request, $response);
108+
109+
$this->assertEquals("foo <?php echo \$this->esi->handle(\$this, 'foo\\'', 'bar\\'', true) ?>"."\n", $response->getContent());
110+
106111
$response = new Response('foo <esi:include src="..." />');
107112
$esi->process($request, $response);
108113

0 commit comments

Comments
 (0)