From 621cb8a1effa92f6a9df1c387d035b22e16c7941 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Tue, 7 May 2013 11:23:40 +0100 Subject: [PATCH] Fix double escaping of date markup in note feed --- app/views/notes/_comment.html.erb | 4 ++-- config/locales/en.yml | 16 ++++++++-------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/app/views/notes/_comment.html.erb b/app/views/notes/_comment.html.erb index 4fe7b59d5..c0d6e17d3 100644 --- a/app/views/notes/_comment.html.erb +++ b/app/views/notes/_comment.html.erb @@ -1,8 +1,8 @@
<% if comment.author.nil? -%> -
<%= t "note.description.#{comment.event}_at", :when => friendly_date(comment.created_at) %>
+
<%= t "note.description.#{comment.event}_at_html", :when => friendly_date(comment.created_at) %>
<% else -%> -
<%= t "note.description.#{comment.event}_at_by", :when => friendly_date(comment.created_at), :user => note_author(comment.author, :only_path => false) %>
+
<%= t "note.description.#{comment.event}_at_by_html", :when => friendly_date(comment.created_at), :user => note_author(comment.author, :only_path => false) %>
<% end -%>
<%= comment.body %>
diff --git a/config/locales/en.yml b/config/locales/en.yml index 67ef5d09b..7b5a3d96a 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -1992,14 +1992,14 @@ en: needs_view: "The user needs to log in before this block will be cleared." note: description: - opened_at: "Created %{when} ago" - opened_at_by: "Created %{when} ago by %{user}" - commented_at: "Updated %{when} ago" - commented_at_by: "Updated %{when} ago by %{user}" - closed_at: "Resolved %{when} ago" - closed_at_by: "Resolved %{when} ago by %{user}" - reopened_at: "Reactivated %{when} ago" - reopened_at_by: "Reactivated %{when} ago by %{user}" + opened_at_html: "Created %{when} ago" + opened_at_by_html: "Created %{when} ago by %{user}" + commented_at_html: "Updated %{when} ago" + commented_at_by_html: "Updated %{when} ago by %{user}" + closed_at_html: "Resolved %{when} ago" + closed_at_by_html: "Resolved %{when} ago by %{user}" + reopened_at_html: "Reactivated %{when} ago" + reopened_at_by_html: "Reactivated %{when} ago by %{user}" rss: title: "OpenStreetMap Notes" description_area: "A list of notes, reported, commented on or closed in your area [(%{min_lat}|%{min_lon}) -- (%{max_lat}|%{max_lon})]" -- 2.39.5