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..9809f71 100644 --- a/core/lib/Drupal/Core/Template/TwigNodeTrans.php +++ b/core/lib/Drupal/Core/Template/TwigNodeTrans.php @@ -149,9 +149,6 @@ protected function compileString(\Twig_NodeInterface $body) { $argPrefix = '@'; while ($args instanceof \Twig_Node_Expression_Filter) { switch ($args->getNode('filter')->getAttribute('value')) { - case 'passthrough': - $argPrefix = '!'; - break; case 'placeholder': $argPrefix = '%'; break; 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..9dcf06f 100644 --- a/core/modules/system/src/Tests/Theme/TwigTransTest.php +++ b/core/modules/system/src/Tests/Theme/TwigTransTest.php @@ -119,11 +119,6 @@ public function testTwigTransTags() { ); $this->assertRaw( - 'PAS-THRU: &"<>', - '{{ token|passthrough }} was successfully translated and prefixed with "!".' - ); - - $this->assertRaw( 'PLAYSHOLDR: &"<>', '{{ token|placeholder }} was successfully translated and prefixed with "%".' ); @@ -188,7 +183,6 @@ protected function checkForDebugMarkup($visible) { '{{ "Hello moon."|trans }}' => '', '{% trans %} with {% plural %}' => '', '{{ token }}' => '', - '{{ token|passthrough }}' => '', '{{ 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 @@
{% trans %} - Pass-through: {{ string|passthrough }} + Raw: {{ string|raw}} {% endtrans %}
@@ -63,7 +63,7 @@ {% set count = token|length %}
{% trans %} - This {{ token.name }} has a length of: {{ count }}. It contains: {{ token.numbers|placeholder }} and {{ token.bad_text }}. Lets pass the bad text through: {{ token.bad_text|passthrough }}. + This {{ token.name }} has a length of: {{ count }}. It contains: {{ token.numbers|placeholder }} and {{ token.bad_text }}. Lets pass the bad text through: {{ token.bad_text|raw }}. {% endtrans %}
diff --git a/core/modules/update/templates/update-project-status.html.twig b/core/modules/update/templates/update-project-status.html.twig index 04ab882..724da19 100644 --- a/core/modules/update/templates/update-project-status.html.twig +++ b/core/modules/update/templates/update-project-status.html.twig @@ -110,10 +110,10 @@ {% if base_themes %} {% set basethemes = base_themes|join(', ') %} - {# Using passthrough since placeholder is already applied in preprocess. #} + {# Using raw since placeholder is already applied in preprocess. #}
{% trans %} - Depends on: {{ basethemes|passthrough }} + Depends on: {{ basethemes|raw }} {% endtrans %}
{% endif %} diff --git a/core/themes/bartik/templates/node.html.twig b/core/themes/bartik/templates/node.html.twig index b390681..3701696 100644 --- a/core/themes/bartik/templates/node.html.twig +++ b/core/themes/bartik/templates/node.html.twig @@ -86,7 +86,7 @@
{{ author_picture }} - {% trans %}Submitted by {{ author_name|passthrough }} on {{ date|passthrough }}{% endtrans %} + {% trans %}Submitted by {{ author_name|raw }} on {{ date|raw }}{% endtrans %} {{ metadata }}