Loading core/lib/Drupal/Core/Utility/TableSort.php +1 −1 Original line number Diff line number Diff line Loading @@ -81,7 +81,7 @@ public static function header(&$cell_content, array &$cell_attributes, array $he $image = ''; } $cell_content = Link::createFromRoute(new FormattableMarkup('@cell_content@image', ['@cell_content' => $cell_content, '@image' => $image]), '<current>', [], [ 'attributes' => ['title' => $title], 'attributes' => ['title' => $title, 'rel' => 'nofollow'], 'query' => array_merge($context['query'], [ 'sort' => $context['sort'], 'order' => $cell_content, Loading core/modules/views/templates/views-view-table.html.twig +2 −2 Original line number Diff line number Diff line Loading @@ -75,14 +75,14 @@ {%- if column.wrapper_element -%} <{{ column.wrapper_element }}> {%- if column.url -%} <a href="{{ column.url }}" title="{{ column.title }}">{{ column.content }}{{ column.sort_indicator }}</a> <a href="{{ column.url }}" title="{{ column.title }}" rel="nofollow">{{ column.content }}{{ column.sort_indicator }}</a> {%- else -%} {{ column.content }}{{ column.sort_indicator }} {%- endif -%} </{{ column.wrapper_element }}> {%- else -%} {%- if column.url -%} <a href="{{ column.url }}" title="{{ column.title }}">{{ column.content }}{{ column.sort_indicator }}</a> <a href="{{ column.url }}" title="{{ column.title }}" rel="nofollow">{{ column.content }}{{ column.sort_indicator }}</a> {%- else -%} {{- column.content }}{{ column.sort_indicator }} {%- endif -%} Loading core/modules/views/tests/src/Functional/Handler/FieldWebTest.php +5 −1 Original line number Diff line number Diff line Loading @@ -84,10 +84,14 @@ public function testClickSorting() { // Clicking a click sort should change the order. $this->clickLink(t('ID')); $this->assertLinkByHref(Url::fromRoute('<none>', [], ['query' => ['order' => 'id', 'sort' => 'desc']])->toString()); $href = Url::fromRoute('<none>', [], ['query' => ['order' => 'id', 'sort' => 'desc']])->toString(); $this->assertLinkByHref($href); // Check that the output has the expected order (asc). $ids = $this->clickSortLoadIdsFromOutput(); $this->assertEqual($ids, range(1, 5)); // Check that the rel attribute has the correct value. $result = $this->xpath('//a[@href="' . $href . '"]'); $this->assertEquals('nofollow', $result[0]->getAttribute('rel')); $this->clickLink(t('ID Sort descending')); // Check that the output has the expected order (desc). Loading core/themes/classy/templates/views/views-view-table.html.twig +2 −2 Original line number Diff line number Diff line Loading @@ -75,14 +75,14 @@ {%- if column.wrapper_element -%} <{{ column.wrapper_element }}> {%- if column.url -%} <a href="{{ column.url }}" title="{{ column.title }}">{{ column.content }}{{ column.sort_indicator }}</a> <a href="{{ column.url }}" title="{{ column.title }}" rel="nofollow">{{ column.content }}{{ column.sort_indicator }}</a> {%- else -%} {{ column.content }}{{ column.sort_indicator }} {%- endif -%} </{{ column.wrapper_element }}> {%- else -%} {%- if column.url -%} <a href="{{ column.url }}" title="{{ column.title }}">{{ column.content }}{{ column.sort_indicator }}</a> <a href="{{ column.url }}" title="{{ column.title }}" rel="nofollow">{{ column.content }}{{ column.sort_indicator }}</a> {%- else -%} {{- column.content }}{{ column.sort_indicator }} {%- endif -%} Loading core/themes/stable/templates/views/views-view-table.html.twig +2 −2 Original line number Diff line number Diff line Loading @@ -73,14 +73,14 @@ {%- if column.wrapper_element -%} <{{ column.wrapper_element }}> {%- if column.url -%} <a href="{{ column.url }}" title="{{ column.title }}">{{ column.content }}{{ column.sort_indicator }}</a> <a href="{{ column.url }}" title="{{ column.title }}" rel="nofollow">{{ column.content }}{{ column.sort_indicator }}</a> {%- else -%} {{ column.content }}{{ column.sort_indicator }} {%- endif -%} </{{ column.wrapper_element }}> {%- else -%} {%- if column.url -%} <a href="{{ column.url }}" title="{{ column.title }}">{{ column.content }}{{ column.sort_indicator }}</a> <a href="{{ column.url }}" title="{{ column.title }}" rel="nofollow">{{ column.content }}{{ column.sort_indicator }}</a> {%- else -%} {{- column.content }}{{ column.sort_indicator }} {%- endif -%} Loading Loading
core/lib/Drupal/Core/Utility/TableSort.php +1 −1 Original line number Diff line number Diff line Loading @@ -81,7 +81,7 @@ public static function header(&$cell_content, array &$cell_attributes, array $he $image = ''; } $cell_content = Link::createFromRoute(new FormattableMarkup('@cell_content@image', ['@cell_content' => $cell_content, '@image' => $image]), '<current>', [], [ 'attributes' => ['title' => $title], 'attributes' => ['title' => $title, 'rel' => 'nofollow'], 'query' => array_merge($context['query'], [ 'sort' => $context['sort'], 'order' => $cell_content, Loading
core/modules/views/templates/views-view-table.html.twig +2 −2 Original line number Diff line number Diff line Loading @@ -75,14 +75,14 @@ {%- if column.wrapper_element -%} <{{ column.wrapper_element }}> {%- if column.url -%} <a href="{{ column.url }}" title="{{ column.title }}">{{ column.content }}{{ column.sort_indicator }}</a> <a href="{{ column.url }}" title="{{ column.title }}" rel="nofollow">{{ column.content }}{{ column.sort_indicator }}</a> {%- else -%} {{ column.content }}{{ column.sort_indicator }} {%- endif -%} </{{ column.wrapper_element }}> {%- else -%} {%- if column.url -%} <a href="{{ column.url }}" title="{{ column.title }}">{{ column.content }}{{ column.sort_indicator }}</a> <a href="{{ column.url }}" title="{{ column.title }}" rel="nofollow">{{ column.content }}{{ column.sort_indicator }}</a> {%- else -%} {{- column.content }}{{ column.sort_indicator }} {%- endif -%} Loading
core/modules/views/tests/src/Functional/Handler/FieldWebTest.php +5 −1 Original line number Diff line number Diff line Loading @@ -84,10 +84,14 @@ public function testClickSorting() { // Clicking a click sort should change the order. $this->clickLink(t('ID')); $this->assertLinkByHref(Url::fromRoute('<none>', [], ['query' => ['order' => 'id', 'sort' => 'desc']])->toString()); $href = Url::fromRoute('<none>', [], ['query' => ['order' => 'id', 'sort' => 'desc']])->toString(); $this->assertLinkByHref($href); // Check that the output has the expected order (asc). $ids = $this->clickSortLoadIdsFromOutput(); $this->assertEqual($ids, range(1, 5)); // Check that the rel attribute has the correct value. $result = $this->xpath('//a[@href="' . $href . '"]'); $this->assertEquals('nofollow', $result[0]->getAttribute('rel')); $this->clickLink(t('ID Sort descending')); // Check that the output has the expected order (desc). Loading
core/themes/classy/templates/views/views-view-table.html.twig +2 −2 Original line number Diff line number Diff line Loading @@ -75,14 +75,14 @@ {%- if column.wrapper_element -%} <{{ column.wrapper_element }}> {%- if column.url -%} <a href="{{ column.url }}" title="{{ column.title }}">{{ column.content }}{{ column.sort_indicator }}</a> <a href="{{ column.url }}" title="{{ column.title }}" rel="nofollow">{{ column.content }}{{ column.sort_indicator }}</a> {%- else -%} {{ column.content }}{{ column.sort_indicator }} {%- endif -%} </{{ column.wrapper_element }}> {%- else -%} {%- if column.url -%} <a href="{{ column.url }}" title="{{ column.title }}">{{ column.content }}{{ column.sort_indicator }}</a> <a href="{{ column.url }}" title="{{ column.title }}" rel="nofollow">{{ column.content }}{{ column.sort_indicator }}</a> {%- else -%} {{- column.content }}{{ column.sort_indicator }} {%- endif -%} Loading
core/themes/stable/templates/views/views-view-table.html.twig +2 −2 Original line number Diff line number Diff line Loading @@ -73,14 +73,14 @@ {%- if column.wrapper_element -%} <{{ column.wrapper_element }}> {%- if column.url -%} <a href="{{ column.url }}" title="{{ column.title }}">{{ column.content }}{{ column.sort_indicator }}</a> <a href="{{ column.url }}" title="{{ column.title }}" rel="nofollow">{{ column.content }}{{ column.sort_indicator }}</a> {%- else -%} {{ column.content }}{{ column.sort_indicator }} {%- endif -%} </{{ column.wrapper_element }}> {%- else -%} {%- if column.url -%} <a href="{{ column.url }}" title="{{ column.title }}">{{ column.content }}{{ column.sort_indicator }}</a> <a href="{{ column.url }}" title="{{ column.title }}" rel="nofollow">{{ column.content }}{{ column.sort_indicator }}</a> {%- else -%} {{- column.content }}{{ column.sort_indicator }} {%- endif -%} Loading