]> git.openstreetmap.org Git - rails.git/commitdiff
Create a second title_user translation, to avoid using html_safe
authorAndy Allan <git@gravitystorm.co.uk>
Thu, 17 Nov 2022 12:10:49 +0000 (12:10 +0000)
committerAndy Allan <git@gravitystorm.co.uk>
Thu, 17 Nov 2022 12:10:49 +0000 (12:10 +0000)
app/views/changesets/history.html.erb
config/locales/en.yml

index b601057f6f1280ba780a15bb67271268e77cd51b..339d60e98845f96f3b0b3bb61c7df090de056d6d 100644 (file)
@@ -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 %>
index 6b072bd1eff160b0351d2a5276253b8fa7e1efcd..c0dcb0c5b8411754f09b0b357d143da3a8329c82 100644 (file)
@@ -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."