diff --git a/core/lib/Drupal/Core/Theme/ThemeManager.php b/core/lib/Drupal/Core/Theme/ThemeManager.php index 7add727..5b37a70 100644 --- a/core/lib/Drupal/Core/Theme/ThemeManager.php +++ b/core/lib/Drupal/Core/Theme/ThemeManager.php @@ -13,7 +13,6 @@ use Symfony\Component\HttpFoundation\RequestStack; use Drupal\Core\Extension\ModuleHandlerInterface; use Drupal\Core\Template\Attribute; -use Drupal\Component\Utility\SafeMarkup; /** * Provides the default implementation of a theme manager. @@ -318,9 +317,9 @@ public function render($hook, array $variables) { $output = ''; if (isset($info['function'])) { if (function_exists($info['function'])) { - // Theme functions do not render via the theme engine, so the output - // is not autoescaped. However, we can only presume that the theme - // function has been written correctly and that the markup is safe. + // Theme functions do not render via the theme engine, so the output is + // not autoescaped. However, we can only presume that the theme function + // has been written correctly and that the markup is safe. $output = SafeString::create($info['function']($variables)); } } diff --git a/core/modules/system/src/Tests/Theme/ThemeTest.php b/core/modules/system/src/Tests/Theme/ThemeTest.php index 7d2704f..4697c2f 100644 --- a/core/modules/system/src/Tests/Theme/ThemeTest.php +++ b/core/modules/system/src/Tests/Theme/ThemeTest.php @@ -60,9 +60,9 @@ function testAttributeMerging() { * Test that _theme() returns expected data types. */ function testThemeDataTypes() { - // theme_test_false is an implemented theme hook so \Drupal::theme() service should - // return a string or an object that implements SafeStringInterface, even though the - // theme function itself can return anything. + // theme_test_false is an implemented theme hook so \Drupal::theme() service + // should return a string or an object that implements SafeStringInterface, + // even though the theme function itself can return anything. $foos = array('null' => NULL, 'false' => FALSE, 'integer' => 1, 'string' => 'foo'); foreach ($foos as $type => $example) { $output = \Drupal::theme()->render('theme_test_foo', array('foo' => $example));