diff --git a/core/lib/Drupal/Core/Template/TwigExtension.php b/core/lib/Drupal/Core/Template/TwigExtension.php index 511cefb..5d8fb48 100644 --- a/core/lib/Drupal/Core/Template/TwigExtension.php +++ b/core/lib/Drupal/Core/Template/TwigExtension.php @@ -92,7 +92,6 @@ public function getFilters() { // "raw" filter and give it identifiable names. These filters should only // be used in "trans" tags. // @see TwigNodeTrans::compileString() - new \Twig_SimpleFilter('passthrough', 'twig_raw_filter', array('is_safe' => array('html'))), new \Twig_SimpleFilter('placeholder', 'twig_raw_filter', array('is_safe' => array('html'))), // Replace twig's escape filter with our own. diff --git a/core/lib/Drupal/Core/Template/TwigNodeTrans.php b/core/lib/Drupal/Core/Template/TwigNodeTrans.php index ea51846..7cad0d0 100644 --- a/core/lib/Drupal/Core/Template/TwigNodeTrans.php +++ b/core/lib/Drupal/Core/Template/TwigNodeTrans.php @@ -149,7 +149,7 @@ protected function compileString(\Twig_NodeInterface $body) { $argPrefix = '@'; while ($args instanceof \Twig_Node_Expression_Filter) { switch ($args->getNode('filter')->getAttribute('value')) { - case 'passthrough': + case 'raw': $argPrefix = '!'; break; case 'placeholder': diff --git a/core/modules/forum/templates/forum-submitted.html.twig b/core/modules/forum/templates/forum-submitted.html.twig index f679363..5743171 100644 --- a/core/modules/forum/templates/forum-submitted.html.twig +++ b/core/modules/forum/templates/forum-submitted.html.twig @@ -17,7 +17,7 @@ */ #} {% if time %} - {% trans %}By {{ author|passthrough }} {{ time }} ago{% endtrans %} + {% trans %}By {{ author|raw }} {{ time }} ago{% endtrans %} {% else %} {{ 'n/a'|t }} {% endif %} diff --git a/core/modules/node/templates/node.html.twig b/core/modules/node/templates/node.html.twig index a78fcb3..917c7c0 100644 --- a/core/modules/node/templates/node.html.twig +++ b/core/modules/node/templates/node.html.twig @@ -92,7 +92,7 @@ diff --git a/core/modules/system/src/Tests/Theme/TwigTransTest.php b/core/modules/system/src/Tests/Theme/TwigTransTest.php index 7f21b2d..35694ac 100644 --- a/core/modules/system/src/Tests/Theme/TwigTransTest.php +++ b/core/modules/system/src/Tests/Theme/TwigTransTest.php @@ -119,8 +119,8 @@ public function testTwigTransTags() { ); $this->assertRaw( - 'PAS-THRU: &"<>', - '{{ token|passthrough }} was successfully translated and prefixed with "!".' + 'RAWZZ: &"<>', + '{{ token|raw }} was successfully translated and prefixed with "!".' ); $this->assertRaw( @@ -188,7 +188,7 @@ protected function checkForDebugMarkup($visible) { '{{ "Hello moon."|trans }}' => '', '{% trans %} with {% plural %}' => '', '{{ token }}' => '', - '{{ token|passthrough }}' => '', + '{{ token|raw }}' => '', '{{ token|placeholder }}' => '', '{{ complex.tokens }}' => '', '{% trans with {"context": "Lolspeak"} %}I have context.{% endtrans %}' => '', diff --git a/core/modules/system/tests/modules/twig_theme_test/templates/twig_theme_test.trans.html.twig b/core/modules/system/tests/modules/twig_theme_test/templates/twig_theme_test.trans.html.twig index 2f4dda0..a29110b 100644 --- a/core/modules/system/tests/modules/twig_theme_test/templates/twig_theme_test.trans.html.twig +++ b/core/modules/system/tests/modules/twig_theme_test/templates/twig_theme_test.trans.html.twig @@ -49,7 +49,7 @@