public function Test::unEscapedScript in Drupal 8
Same name and namespace in other branches
- 9 core/modules/system/tests/modules/test_page_test/src/Controller/Test.php \Drupal\test_page_test\Controller\Test::unEscapedScript()
File
- core/
modules/ system/ tests/ modules/ test_page_test/ src/ Controller/ Test.php, line 138
Class
- Test
- Defines a test controller for page titles.
Namespace
Drupal\test_page_test\ControllerCode
public function unEscapedScript() {
return [
'#prefix' => '<div class="unescaped">',
'#markup' => Markup::create("<script>alert('Marked safe');alert(\"Marked safe\");</script>"),
'#suffix' => '</div>',
];
}