diff --git a/core/modules/views/src/Tests/Handler/FieldUnitTest.php b/core/modules/views/src/Tests/Handler/FieldUnitTest.php index a6021ee..c24d599 100644 --- a/core/modules/views/src/Tests/Handler/FieldUnitTest.php +++ b/core/modules/views/src/Tests/Handler/FieldUnitTest.php @@ -220,11 +220,37 @@ public function testFieldTokens() { $random_text = $this->randomMachineName(); $job_field->setTestValue($random_text); $output = $job_field->advancedRender($row); - $this->assertSubString($output, $old_token, format_string('Make sure the old token style (!token => !value) is not changed in the output (!output)', [ + $this->assertEqual($output, $old_token, format_string('Make sure the old token style (!token => !value) is not changed in the output (!output)', [ '!value' => $random_text, '!output' => $output, '!token' => $job_field->options['alter']['text'], ])); + + // Verify HTML tags are allowed in rewrite templates while token + // replacements are escaped. + $job_field->options['alter']['text'] = '