OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
add rel="nofollow" to table sort links
ulferts5dddb5932c12
diff --git a/app/helpers/sort_helper.rb b/app/helpers/sort_helper.rbindex cbbda73fd75..b578490095d 100644--- a/app/helpers/sort_helper.rb+++ b/app/helpers/sort_helper.rb@@ -286,7 +286,7 @@ module SortHelperallowed_params ||= %w[filters per_page expand columns]# Don't lose other params.- link_to_content_update(h(caption), safe_query_params(allowed_params).merge(sort_options), html_options)+ link_to_content_update(h(caption), safe_query_params(allowed_params).merge(sort_options), html_options.merge(rel: :nofollow))end# Returns a table header <th> tag with a sort link for the named columndiff --git a/frontend/src/app/features/work-packages/components/wp-table/sort-header/sort-header.directive.html b/frontend/src/app/features/work-packages/components/wp-table/sort-header/sort-header.directive.htmlindex 6ebe2dce1a3..3be2f295f23 100644--- a/frontend/src/app/features/work-packages/components/wp-table/sort-header/sort-header.directive.html+++ b/frontend/src/app/features/work-packages/components/wp-table/sort-header/sort-header.directive.html@@ -17,7 +17,8 @@[ngClass]="[directionClass && 'sort', directionClass]"lang-attributelang="{{locale}}"- id="{{ headerColumn.id }}">{{headerColumn.name}}</a>+ id="{{ headerColumn.id }}"+ rel="nofollow">{{headerColumn.name}}</a><a *ngIf="!sortable">{{headerColumn.name}}</a><op-icon icon-classes="dropdown-indicator icon-small icon-pulldown"@@ -47,7 +48,8 @@[ngClass]="[directionClass && 'sort', directionClass]"lang-attributelang="{{locale}}"- id="{{ headerColumn.id }}">{{headerColumn.name}}</a>+ id="{{ headerColumn.id }}"+ rel="nofollow">{{headerColumn.name}}</a><a *ngIf="!sortable">{{headerColumn.name}}</a>diff --git a/spec/helpers/sort_helper_spec.rb b/spec/helpers/sort_helper_spec.rbindex 768f5253ec7..29d1ed8ff6d 100644--- a/spec/helpers/sort_helper_spec.rb+++ b/spec/helpers/sort_helper_spec.rb@@ -148,6 +148,7 @@ RSpec.describe SortHelper do<div class="generic-table--sort-header"><span><a href="/work_packages?sort=sort_criteria_params"+ rel="nofollow"title="Sort by "Id"">Id</a></span></div>@@ -166,6 +167,7 @@ RSpec.describe SortHelper do<div class="generic-table--sort-header"><span class="sort asc"><a href="/work_packages?sort=sort_criteria_params"+ rel="nofollow"title="Ascending sorted by "Id"">Id</a></span></div>@@ -186,6 +188,7 @@ RSpec.describe SortHelper do<div class="generic-table--sort-header"><span class="sort desc"><a href="/work_packages?sort=sort_criteria_params"+ rel="nofollow"title="Descending sorted by "Id"">Id</a></span></div>@@ -216,6 +219,7 @@ RSpec.describe SortHelper do<div class="generic-table--sort-header"><span><a href="/work_packages?columns=a%2Cb%2Cc&expand=nope&filters=xyz&per_page=42&sort=sort_criteria_params"+ rel="nofollow"title="Sort by "Id"">Id</a></span></div>@@ -235,6 +239,7 @@ RSpec.describe SortHelper do<div class="generic-table--sort-header"><span><a href="/work_packages?baz=foo&foo=bar&sort=sort_criteria_params"+ rel="nofollow"title="Sort by "Id"">Id</a></span></div>