From 1559d880485d7d6e9ccc73095be160384d88a828 Mon Sep 17 00:00:00 2001 From: Andy Allan Date: Thu, 17 Nov 2022 12:10:49 +0000 Subject: [PATCH] Create a second title_user translation, to avoid using html_safe --- app/views/changesets/history.html.erb | 2 +- config/locales/en.yml | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app/views/changesets/history.html.erb b/app/views/changesets/history.html.erb index b601057f6..339d60e98 100644 --- a/app/views/changesets/history.html.erb +++ b/app/views/changesets/history.html.erb @@ -6,7 +6,7 @@ <% set_title(changeset_index_title(params, current_user)) @heading = if params[:display_name] - t("changesets.index.title_user", :user => link_to(params[:display_name], user_path(:display_name => params[:display_name]))).html_safe + t("changesets.index.title_user_link_html", :user_link => link_to(params[:display_name], user_path(:display_name => params[:display_name]))) else @title end %> diff --git a/config/locales/en.yml b/config/locales/en.yml index 6b072bd1e..c0dcb0c5b 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -446,6 +446,7 @@ en: index: title: "Changesets" title_user: "Changesets by %{user}" + title_user_link_html: "Changesets by %{user_link}" title_friend: "Changesets by my friends" title_nearby: "Changesets by nearby users" empty: "No changesets found." -- 2.39.5