commit 8195a1bff064e9303ce6693085488fe5e6bc57bf Author: Joel Pittet Date: Sat Apr 11 07:37:01 2015 -0700 bold diff --git a/core/includes/theme.inc b/core/includes/theme.inc index 72b24fc..872ac81 100644 --- a/core/includes/theme.inc +++ b/core/includes/theme.inc @@ -1062,7 +1062,6 @@ 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'])); @@ -1271,7 +1270,7 @@ function template_preprocess_html(&$variables) { // Construct page title. if (!empty($variables['page']['#title'])) { $head_title = array( - 'title' => SafeMarkup::checkAdminXss(trim(strip_tags($variables['page']['#title']))), + 'title' => trim(strip_tags($variables['page']['#title'])), 'name' => $site_config->get('name'), ); } @@ -1284,18 +1283,15 @@ function template_preprocess_html(&$variables) { ); } else { - $head_title = array('name' => $site_config->get('name')); + $head_title = ['name' => $site_config->get('name')]; if ($site_config->get('slogan')) { - $head_title['slogan'] = strip_tags(Xss::filterAdmin($site_config->get('slogan'))); + $head_title['slogan'] = strip_tags($site_config->get('slogan')); } } + $variables['head_title'] = $head_title; + // @deprecated in Drupal 8.0.0, will be removed before Drupal 9.0.0. $variables['head_title_array'] = $head_title; - $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 @@ -1493,11 +1489,8 @@ function template_preprocess_install_page(&$variables) { // Override the site name that is displayed on the page, since Drupal is // still in the process of being installed. - $distribution_name = SafeMarkup::checkPlain(drupal_install_profile_distribution_name()); + $distribution_name = drupal_install_profile_distribution_name(); $variables['site_name'] = $distribution_name; - $variables['head_title_array']['name'] = $distribution_name; - - $variables['head_title'] = implode(' | ', $variables['head_title_array']); } /** @@ -1766,7 +1759,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, 'options' => array()), + 'variables' => array('url' => NULL, 'title' => NULL), ), 'progress_bar' => array( 'variables' => array('label' => NULL, 'percent' => NULL, 'message' => NULL), diff --git a/core/modules/system/templates/html.html.twig b/core/modules/system/templates/html.html.twig index a11c8a4..13925cf 100644 --- a/core/modules/system/templates/html.html.twig +++ b/core/modules/system/templates/html.html.twig @@ -10,9 +10,8 @@ * - css: A list of CSS files for the current page. * - head: Markup for the HEAD element (including meta tags, keyword tags, and * so on). - * - head_title: A modified version of the page title, for use in the TITLE tag. - * - head_title_array: List of text elements that make up the head_title - * variable. May contain or more of the following: + * - head_title: List of text elements that make up the head_title variable. + * May contain or more of the following: * - title: The title of the page. * - name: The name of the site. * - slogan: The slogan of the site. @@ -33,7 +32,7 @@ {{ head }} - {{ head_title }} + {{ head_title|safe_join(' | ') }} {{ styles }} {{ scripts }} diff --git a/core/themes/classy/templates/layout/html.html.twig b/core/themes/classy/templates/layout/html.html.twig index 1bb0ac6..b734f03 100644 --- a/core/themes/classy/templates/layout/html.html.twig +++ b/core/themes/classy/templates/layout/html.html.twig @@ -10,9 +10,8 @@ * - css: A list of CSS files for the current page. * - head: Markup for the HEAD element (including meta tags, keyword tags, and * so on). - * - head_title: A modified version of the page title, for use in the TITLE tag. - * - head_title_array: List of text elements that make up the head_title - * variable. May contain or more of the following: + * - head_title: List of text elements that make up the head_title variable. + * May contain or more of the following: * - title: The title of the page. * - name: The name of the site. * - slogan: The slogan of the site. @@ -38,7 +37,7 @@ {{ head }} - {{ head_title }} + {{ head_title|safe_join(' | ') }} {{ styles }} {{ scripts }}