twig-raw-test.html.twig

Same filename and directory in other branches
  1. 9 core/modules/system/tests/modules/twig_theme_test/templates/twig-raw-test.html.twig
  2. 10 core/modules/system/tests/modules/twig_theme_test/templates/twig-raw-test.html.twig
  3. 11.x core/modules/system/tests/modules/twig_theme_test/templates/twig-raw-test.html.twig
{# Template for testing |raw with autoescape. #}
{% autoescape %}
  {{ script|raw }}
{% endautoescape %}
1 theme call to twig-raw-test.html.twig
TwigRawTest::testAutoescapeRaw in core/modules/system/tests/src/Kernel/Theme/TwigRawTest.php
Tests the raw filter inside an autoescape tag.

File

core/modules/system/tests/modules/twig_theme_test/templates/twig-raw-test.html.twig

View source
  1. {# Template for testing |raw with autoescape. #}
  2. {% autoescape %}
  3. {{ script|raw }}
  4. {% endautoescape %}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.