Fix "rel" attribute in footer description links

We were accidentally filtering this attribute when sanitizing the text
since commit 928312e21.
This commit is contained in:
Javi Martín
2023-10-15 23:55:02 +02:00
parent 8053cc5e1c
commit 79c1aa0755
3 changed files with 7 additions and 1 deletions

View File

@@ -8,7 +8,8 @@
<p class="info">
<%= sanitize(t("layouts.footer.description",
open_source: open_source_link,
consul: repository_link)) %>
consul: repository_link),
attributes: allowed_link_attributes) %>
</p>
</div>

View File

@@ -14,4 +14,8 @@ class Layout::FooterComponent < ApplicationComponent
def repository_link
link_to(t("layouts.footer.consul"), t("layouts.footer.consul_url"), rel: "nofollow")
end
def allowed_link_attributes
self.class.sanitized_allowed_attributes + ["rel"]
end
end