diff --git a/core/modules/block/block.module b/core/modules/block/block.module index 95b243f..0061e12 100644 --- a/core/modules/block/block.module +++ b/core/modules/block/block.module @@ -541,7 +541,7 @@ function template_preprocess_block(&$variables) { $variables['block']->label_hidden = $variables['block']->label; $variables['block']->label = ''; } - $variables['label'] = check_plain($variables['block']->label); + $variables['label'] = check_plain($variables['elements']['#block']->label); // All blocks get an independent counter for each region. if (!isset($block_counter[$variables['block']->region])) { diff --git a/core/modules/language/lib/Drupal/language/Tests/LanguageSwitchingTest.php b/core/modules/language/lib/Drupal/language/Tests/LanguageSwitchingTest.php index ac834d1..7b36f92 100644 --- a/core/modules/language/lib/Drupal/language/Tests/LanguageSwitchingTest.php +++ b/core/modules/language/lib/Drupal/language/Tests/LanguageSwitchingTest.php @@ -59,7 +59,7 @@ function testLanguageBlock() { $this->assertText($block->label(), 'Language switcher block found.'); // Assert that only the current language is marked as active. - list($language_switcher) = $this->xpath('//div[@id=:id]/div[@class="content"]', array(':id' => 'block-test-language-block')); + list($language_switcher) = $this->xpath('//div[@id=:id]/div[contains(@class, "content")]', array(':id' => 'block-test-language-block')); $links = array( 'active' => array(), 'inactive' => array(),