diff options
Diffstat (limited to 'vendor/twig/twig/test/Twig/Tests/Fixtures/tags/autoescape/strategy.test')
-rw-r--r-- | vendor/twig/twig/test/Twig/Tests/Fixtures/tags/autoescape/strategy.test | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/autoescape/strategy.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/autoescape/strategy.test new file mode 100644 index 00000000..cf8cceef --- /dev/null +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/autoescape/strategy.test | |||
@@ -0,0 +1,17 @@ | |||
1 | --TEST-- | ||
2 | "autoescape" tag accepts an escaping strategy | ||
3 | --TEMPLATE-- | ||
4 | {% autoescape true js %}{{ var }}{% endautoescape %} | ||
5 | |||
6 | {% autoescape true html %}{{ var }}{% endautoescape %} | ||
7 | |||
8 | {% autoescape 'js' %}{{ var }}{% endautoescape %} | ||
9 | |||
10 | {% autoescape 'html' %}{{ var }}{% endautoescape %} | ||
11 | --DATA-- | ||
12 | return array('var' => '<br />"') | ||
13 | --EXPECT-- | ||
14 | \x3Cbr\x20\x2F\x3E\x22 | ||
15 | <br />" | ||
16 | \x3Cbr\x20\x2F\x3E\x22 | ||
17 | <br />" | ||