Loading core/modules/help_topics/tests/modules/help_topics_test/bad_help_topics/syntax/bad_help_topics.locale.html.twig 0 → 100644 +5 −0 Original line number Diff line number Diff line --- label: 'Help topic with locale-unsafe tag' top_level: true --- <p>{% trans %}some translated text and a <script>alert('hello')</script>{% endtrans %}</p> core/modules/help_topics/tests/modules/help_topics_test/bad_help_topics/syntax/bad_help_topics.translated.html.twig +1 −0 Original line number Diff line number Diff line Loading @@ -3,3 +3,4 @@ label: 'Help topic with untranslated text' top_level: true --- <p>Body goes here</p> <p>{% trans %}some translated text too{% endtrans %}</p> core/modules/help_topics/tests/modules/help_topics_twig_tester/help_topics_twig_tester.info.yml 0 → 100644 +6 −0 Original line number Diff line number Diff line name: 'Help Topics Twig Tester' type: module description: 'Support module for help testing.' package: Testing dependencies: - drupal:help_topics core/modules/help_topics/tests/modules/help_topics_twig_tester/help_topics_twig_tester.services.yml 0 → 100644 +6 −0 Original line number Diff line number Diff line services: help_test_twig.extension: class: Drupal\help_topics_twig_tester\HelpTestTwigExtension arguments: [] tags: - { name: twig.extension, priority: 500 } core/modules/help_topics/tests/modules/help_topics_twig_tester/src/HelpTestTwigExtension.php 0 → 100644 +21 −0 Original line number Diff line number Diff line <?php namespace Drupal\help_topics_twig_tester; use Twig\Extension\AbstractExtension; /** * Defines and registers Drupal Twig extensions for testing help topics. */ class HelpTestTwigExtension extends AbstractExtension { /** * {@inheritdoc} */ public function getNodeVisitors() { return [ new HelpTestTwigNodeVisitor(), ]; } } Loading
core/modules/help_topics/tests/modules/help_topics_test/bad_help_topics/syntax/bad_help_topics.locale.html.twig 0 → 100644 +5 −0 Original line number Diff line number Diff line --- label: 'Help topic with locale-unsafe tag' top_level: true --- <p>{% trans %}some translated text and a <script>alert('hello')</script>{% endtrans %}</p>
core/modules/help_topics/tests/modules/help_topics_test/bad_help_topics/syntax/bad_help_topics.translated.html.twig +1 −0 Original line number Diff line number Diff line Loading @@ -3,3 +3,4 @@ label: 'Help topic with untranslated text' top_level: true --- <p>Body goes here</p> <p>{% trans %}some translated text too{% endtrans %}</p>
core/modules/help_topics/tests/modules/help_topics_twig_tester/help_topics_twig_tester.info.yml 0 → 100644 +6 −0 Original line number Diff line number Diff line name: 'Help Topics Twig Tester' type: module description: 'Support module for help testing.' package: Testing dependencies: - drupal:help_topics
core/modules/help_topics/tests/modules/help_topics_twig_tester/help_topics_twig_tester.services.yml 0 → 100644 +6 −0 Original line number Diff line number Diff line services: help_test_twig.extension: class: Drupal\help_topics_twig_tester\HelpTestTwigExtension arguments: [] tags: - { name: twig.extension, priority: 500 }
core/modules/help_topics/tests/modules/help_topics_twig_tester/src/HelpTestTwigExtension.php 0 → 100644 +21 −0 Original line number Diff line number Diff line <?php namespace Drupal\help_topics_twig_tester; use Twig\Extension\AbstractExtension; /** * Defines and registers Drupal Twig extensions for testing help topics. */ class HelpTestTwigExtension extends AbstractExtension { /** * {@inheritdoc} */ public function getNodeVisitors() { return [ new HelpTestTwigNodeVisitor(), ]; } }