projects
/
web/konrad/twig.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
f44f0cd
)
fixed documentation for the sandbox security policy
author
Fabien Potencier
<fabien.potencier@gmail.com>
Wed, 12 Jan 2011 09:39:35 +0000 (10:39 +0100)
committer
Fabien Potencier
<fabien.potencier@gmail.com>
Wed, 12 Jan 2011 09:39:35 +0000 (10:39 +0100)
doc/api.rst
patch
|
blob
|
history
diff --git
a/doc/api.rst
b/doc/api.rst
index
2dcfb5a
..
a9dfd83
100644
(file)
--- a/
doc/api.rst
+++ b/
doc/api.rst
@@
-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