commit 5dcc6e1ee145a0abaff16f360003bca59e1189fc Author: Joel Pittet Date: Sun Apr 14 02:06:54 2013 -0700 some touchups diff --git a/core/includes/theme.inc b/core/includes/theme.inc index 1ac0f6b..d7e1ed0 100644 --- a/core/includes/theme.inc +++ b/core/includes/theme.inc @@ -1745,6 +1745,14 @@ function template_preprocess_links(&$variables) { $links = $variables['links']; $heading = &$variables['heading']; + + // Remove 'links' from the attributes array. This is added through + // template_preprocess() but we do not need it. + // @todo Remove after http://drupal.org/node/1938430 is resolved. + unset($variables['attributes']['class'][0]); + if (empty($variables['attributes']['class'])) { + unset($variables['attributes']['class']); + } $variables['attributes'] = new Attribute($variables['attributes']); if (!empty($links)) { @@ -1764,6 +1772,7 @@ function template_preprocess_links(&$variables) { if (isset($heading['attributes'])) { $heading['attributes'] = new Attribute($heading['attributes']); } + $heading['text'] = check_plain($heading['text']); } $num_links = count($links); @@ -1782,7 +1791,6 @@ function template_preprocess_links(&$variables) { if ($i == $num_links) { $class[] = 'last'; } - // Handle links. if (isset($link['href'])) { $is_current_path = ($link['href'] == current_path() || ($link['href'] == '' && drupal_is_front_page())); @@ -1791,12 +1799,6 @@ function template_preprocess_links(&$variables) { $class[] = 'active'; $link['attributes']['class'][] = 'active'; } - // debug($is_current_path); - // debug($link); - // debug(current_path()); - // debug(drupal_is_front_page()); - // @todo Reconcile Views usage of 'ajax' as a boolean with the rest of - // core's usage of it as an array. $item = array( '#type' => 'link', '#title' => $link['title'],