diff --git a/core/includes/theme.inc b/core/includes/theme.inc index 1e2880c..28b027a 100644 --- a/core/includes/theme.inc +++ b/core/includes/theme.inc @@ -2075,7 +2075,7 @@ function template_preprocess_page(&$variables) { $variables['base_path'] = base_path(); $variables['front_page'] = url(); - $variables['feed_icons'] = drupal_get_feeds(); + $variables['feed_icons'] = new Markup(drupal_get_feeds()); $variables['language'] = $language_interface; $variables['language']->dir = $language_interface->direction ? 'rtl' : 'ltr'; $variables['logo'] = theme_get_setting('logo.url'); diff --git a/core/lib/Drupal/Core/Template/Attribute.php b/core/lib/Drupal/Core/Template/Attribute.php index 473b31a..ff56087 100644 --- a/core/lib/Drupal/Core/Template/Attribute.php +++ b/core/lib/Drupal/Core/Template/Attribute.php @@ -31,7 +31,7 @@ * // Produces * @endcode */ -class Attribute implements \ArrayAccess, \IteratorAggregate { +class Attribute extends \Twig_Markup implements \ArrayAccess, \IteratorAggregate { /** * Stores the attribute data. diff --git a/core/lib/Drupal/Core/Template/RenderWrapper.php b/core/lib/Drupal/Core/Template/RenderWrapper.php index 1de1798..58888e6 100644 --- a/core/lib/Drupal/Core/Template/RenderWrapper.php +++ b/core/lib/Drupal/Core/Template/RenderWrapper.php @@ -16,7 +16,7 @@ * $variables['scripts'] = new RenderWrapper('drupal_get_js', array('footer')); * @endcode */ -class RenderWrapper { +class RenderWrapper extends \Twig_Markup { /** * Stores the callback function to be called when rendered. diff --git a/core/themes/engines/twig/twig.engine b/core/themes/engines/twig/twig.engine index f00ed71..15be9ff 100644 --- a/core/themes/engines/twig/twig.engine +++ b/core/themes/engines/twig/twig.engine @@ -138,7 +138,7 @@ function twig_render_var($arg) { if (is_object($arg)) { if (method_exists($arg, '__toString')) { - return new Markup($arg); + return new $arg; } throw new Exception(t('Object of type "@class" cannot be printed.', array('@class' => get_class($arg)))); }