diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 202d1cad9ea79cf3f821e4f02d3e96d219787d29..fa3dd35e78eb0cfa308e35c3b0821756216d589b 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -5,7 +5,6 @@ Drupal 7.51, xxxx-xx-xx (development version) used as an admin theme. - Exceptions thrown in dblog_watchdog() are now caught and ignored. - Clarified the warning that appears when modules are missing or have moved. -- If the page title is "0", it is now displayed. - Log messages are now XSS filtered on display. - Draggable tables do now work on touch screen devices. - Added setting for allowing double underscores in CSS identifiers. diff --git a/includes/theme.inc b/includes/theme.inc index 8f929ac2142a6d7b7c2405be95f40949489298b3..9b606e9fb199cd395e64739c3fcbaf56e2037294 100644 --- a/includes/theme.inc +++ b/includes/theme.inc @@ -2597,10 +2597,9 @@ function template_preprocess_html(&$variables) { } // Construct page title. - $title = drupal_get_title(); - if (strlen(trim($title))) { + if (drupal_get_title()) { $head_title = array( - 'title' => strip_tags($title), + 'title' => strip_tags(drupal_get_title()), 'name' => check_plain(variable_get('site_name', 'Drupal')), ); } @@ -2699,8 +2698,7 @@ function template_process_page(&$variables) { $variables['breadcrumb'] = theme('breadcrumb', array('breadcrumb' => drupal_get_breadcrumb())); } if (!isset($variables['title'])) { - $title = drupal_get_title(); - $variables['title'] = strlen(trim($title)) ? $title : NULL; + $variables['title'] = drupal_get_title(); } // Generate messages last in order to capture as many as possible for the diff --git a/modules/node/node.test b/modules/node/node.test index 8ec01a41f654ef7ea6ce202dbad2b6d3d171bf37..e8eb459e3bb876146c62980fa1dd91a37aa6ebca 100644 --- a/modules/node/node.test +++ b/modules/node/node.test @@ -1943,32 +1943,6 @@ class NodeTitleTestCase extends DrupalWebTestCase { // Test node title is clickable on teaser list (/node). $this->drupalGet('node'); $this->clickLink($node->title); - - // Test edge cases. - // When node title is set to 0, the title should be '0'. - $node = $this->drupalCreateNode(array('title' => '0')); - $this->drupalGet('node/' . $node->nid); - $this->assertTitle('0' . ' | Drupal', 'Page title is equal to 0.', 'Node'); - // Test that 0 appears in the template