diff --git a/core/lib/Drupal/Core/Theme/ThemeManager.php b/core/lib/Drupal/Core/Theme/ThemeManager.php index 7fc2a05..3075833 100644 --- a/core/lib/Drupal/Core/Theme/ThemeManager.php +++ b/core/lib/Drupal/Core/Theme/ThemeManager.php @@ -320,7 +320,10 @@ public function render($hook, array $variables) { // 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 = SafeMarkup::set($info['function']($variables)); + // + // Therefore, the theme function itself is responsible for using + // SafeMarkup::set() as necessary, not this function, i.e.: render(). + $output = $info['function']($variables); } } else {