1--TEST-- 2sandbox tag 3--TEMPLATE-- 4{%- sandbox %} 5 {%- include "foo.twig" %} 6 7 {% if 1 %} 8 {%- include "foo.twig" %} 9 {% endif %} 10{%- endsandbox %} 11--TEMPLATE(foo.twig)-- 12foo 13--EXCEPTION-- 14Twig\Error\SyntaxError: Only "include" tags are allowed within a "sandbox" section in "index.twig" at line 5. 15