mirror of
https://github.com/twigphp/Twig.git
synced 2026-09-03 22:17:36 +00:00
43245cbd341a7d21aa4bd66cdfe918c5e37efc48
Commits
-------
0cbf5a0 Added an option to mark filters as preserving the safeness
Discussion
----------
Added an option to mark filters as preserving the safeness
Closes #678
I haven't written a test for this yet as I don't know how to provide a stub filter (as none of the core filters use this option) for the setup of the testsuite.
---------------------------------------------------------------------------
by fabpot at 2012-04-07T20:15:36Z
@stof: Can you also add some information in the phpdoc with an example so that people understand more easily when and why you would want to use this new option? Thanks.
---------------------------------------------------------------------------
by fabpot at 2012-04-07T20:16:36Z
Also, adding a unit test that demonstrates the bug you had in #678 would be good.
---------------------------------------------------------------------------
by stof at 2012-04-20T08:33:58Z
@fabpot none of the core filters are using this options, so what is the right way to add a test ?
---------------------------------------------------------------------------
by fabpot at 2012-04-20T08:36:26Z
by defining a filter in the test that uses it.
---------------------------------------------------------------------------
by stof at 2012-04-20T08:39:06Z
but is it possible to register a filter from the tests with the custom stuff used by Twig ?
---------------------------------------------------------------------------
by fabpot at 2012-04-20T08:48:06Z
in integrationTest.php, we already have quite a few functions and filters registered. I would just be a matter of adding a new one.
---------------------------------------------------------------------------
by stof at 2012-04-20T16:17:01Z
@fabpot renamed, tested and squashed
…
…
Twig, the flexible, fast, and secure template language for PHP
Twig is a template language for PHP, released under the new BSD license (code and documentation).
Twig uses a syntax similar to the Django and Jinja template languages which inspired the Twig runtime environment.
More Information
Read the documentation for more information.
Description
Languages
PHP
99.9%