mirror of
https://github.com/twigphp/Twig.git
synced 2026-09-13 02:46:29 +00:00
fixed documentation for the sandbox security policy
This commit is contained in:
+2
-1
@@ -414,7 +414,8 @@ tags, filters, properties, and methods::
|
||||
$properties = array(
|
||||
'Article' => array('title', 'body'),
|
||||
);
|
||||
$policy = new Twig_Sandbox_SecurityPolicy($tags, $filters, $methods, $properties);
|
||||
$functions = array('range');
|
||||
$policy = new Twig_Sandbox_SecurityPolicy($tags, $filters, $methods, $properties, $functions);
|
||||
|
||||
With the previous configuration, the security policy will only allow usage of
|
||||
the ``if`` tag, and the ``upper`` filter. Moreover, the templates will only be
|
||||
|
||||
Reference in New Issue
Block a user