mirror of
https://github.com/Mibew/handlebars.php.git
synced 2024-11-15 08:44:12 +03:00
Add tests for extra arguments escape problem
This commit is contained in:
parent
81f3efbb84
commit
d92640890f
@ -326,6 +326,13 @@ class HandlebarsTest extends \PHPUnit_Framework_TestCase
|
||||
return new \Handlebars\SafeString('<strong>Test</strong>');
|
||||
});
|
||||
$this->assertEquals('<strong>Test</strong>', $engine->render('{{safeStringTest}}', array()));
|
||||
|
||||
$engine->addHelper('argsTest', function($template, $context, $arg) {
|
||||
$parsed_args = $template->parseArguments($arg);
|
||||
|
||||
return implode(' ', $parsed_args);
|
||||
});
|
||||
$this->assertEquals('a \"b\" c', $engine->render('{{argsTest "a" "\"b\"" \'c\'}}', array()));
|
||||
}
|
||||
|
||||
public function testInvalidHelperMustacheStyle()
|
||||
|
Loading…
Reference in New Issue
Block a user