diff --git a/core/includes/theme.inc b/core/includes/theme.inc index dfee854..72b24fc 100644 --- a/core/includes/theme.inc +++ b/core/includes/theme.inc @@ -1062,6 +1062,7 @@ function template_preprocess_item_list(&$variables) { * - url: An internal system path or a fully qualified external URL of the * feed. * - title: A descriptive title of the feed. + * - options: Additional $options elements used by the url() function. */ function template_preprocess_feed_icon(&$variables) { $text = t('Subscribe to !feed-title', array('!feed-title' => $variables['title'])); @@ -1270,8 +1271,8 @@ function template_preprocess_html(&$variables) { // Construct page title. if (!empty($variables['page']['#title'])) { $head_title = array( - 'title' => SafeMarkup::set(trim(strip_tags($variables['page']['#title']))), - 'name' => SafeMarkup::checkPlain($site_config->get('name')), + 'title' => SafeMarkup::checkAdminXss(trim(strip_tags($variables['page']['#title']))), + 'name' => $site_config->get('name'), ); } // @todo Remove once views is not bypassing the view subscriber anymore. @@ -1279,24 +1280,22 @@ function template_preprocess_html(&$variables) { elseif ($is_front_page) { $head_title = array( 'title' => t('Home'), - 'name' => SafeMarkup::checkPlain($site_config->get('name')), + 'name' => $site_config->get('name'), ); } else { - $head_title = array('name' => SafeMarkup::checkPlain($site_config->get('name'))); + $head_title = array('name' => $site_config->get('name')); if ($site_config->get('slogan')) { $head_title['slogan'] = strip_tags(Xss::filterAdmin($site_config->get('slogan'))); } } $variables['head_title_array'] = $head_title; - $output = ''; - $separator = ''; - foreach ($head_title as $item) { - $output .= $separator . SafeMarkup::escape($item); - $separator = ' | '; - } - $variables['head_title'] = SafeMarkup::set($output); + $variables['head_title'] = array( + '#type' => 'inline_template', + '#template' => '{{ head_title|safe_join(" | ") }}', + '#context' => array('head_title' => $head_title), + ); // Collect all attachments. This must happen in the preprocess function for // #type => html, to ensure that attachments added in #pre_render callbacks @@ -1767,7 +1766,7 @@ function drupal_common_theme() { 'variables' => array('items' => array(), 'title' => '', 'list_type' => 'ul', 'attributes' => array(), 'empty' => NULL), ), 'feed_icon' => array( - 'variables' => array('url' => NULL, 'title' => NULL), + 'variables' => array('url' => NULL, 'title' => NULL, 'options' => array()), ), 'progress_bar' => array( 'variables' => array('label' => NULL, 'percent' => NULL, 'message' => NULL),