diff -u b/core/includes/theme.inc b/core/includes/theme.inc
--- b/core/includes/theme.inc
+++ b/core/includes/theme.inc
@@ -650,6 +650,7 @@
'url' => NULL,
);
+ $li_attributes = array();
$keys = ['title', 'url'];
$link_element = array(
'#type' => 'link',
@@ -675,7 +676,6 @@
'url' => NULL,
);
- $li_attributes = array();
$keys = ['title', 'url'];
$link_element = array(
'#type' => 'link',
only in patch2:
unchanged:
--- a/core/modules/system/src/Tests/Theme/FunctionsTest.php
+++ b/core/modules/system/src/Tests/Theme/FunctionsTest.php
@@ -274,11 +274,11 @@ function testLinks() {
$expected_links .= '
' . Html::escape('A ') . '';
$expected_links .= '' . Html::escape('Plain "text"') . '';
$expected_links .= '' . Html::escape('potentially unsafe text that be escaped') . '';
- $expected_links .= '' . Html::escape('Front page') . '';
- $expected_links .= '' . Html::escape('Test route') . '';
+ $expected_links .= '' . Html::escape('Front page') . '';
+ $expected_links .= '' . Html::escape('Test route') . '';
$query = array('key' => 'value');
$encoded_query = Html::escape(Json::encode($query));
- $expected_links .= '' . Html::escape('Query test route') . '';
+ $expected_links .= '' . Html::escape('Query test route') . '';
$expected_links .= '';
$expected = $expected_heading . $expected_links;
$this->assertThemeOutput('links', $variables, $expected);
@@ -395,11 +395,11 @@ function testIndexedKeyedLinks() {
$expected_links .= '' . Html::escape('A ') . '';
$expected_links .= '' . Html::escape('Plain "text"') . '';
$expected_links .= '' . Html::escape('potentially unsafe text that be escaped') . '';
- $expected_links .= '' . Html::escape('Front page') . '';
- $expected_links .= '' . Html::escape('Test route') . '';
+ $expected_links .= '' . Html::escape('Front page') . '';
+ $expected_links .= '' . Html::escape('Test route') . '';
$query = ['key' => 'value'];
$encoded_query = Html::escape(Json::encode($query));
- $expected_links .= '' . Html::escape('Query test route') . '';
+ $expected_links .= '' . Html::escape('Query test route') . '';
$expected_links .= '';
$expected = $expected_heading . $expected_links;
$this->assertThemeOutput('links', $variables, $expected);