diff --git a/app/views/browse/_containing_relation.html.erb b/app/views/browse/_containing_relation.html.erb
index b3cb90cec..ba05c1fe4 100644
--- a/app/views/browse/_containing_relation.html.erb
+++ b/app/views/browse/_containing_relation.html.erb
@@ -1,7 +1,7 @@
<%= linked_name = link_to h(printable_name(containing_relation.relation)), :action => "relation", :id => containing_relation.relation.id.to_s
if containing_relation.member_role.blank?
- raw t ".entry", :relation_name => linked_name
+ t ".entry_html", :relation_name => linked_name
else
- raw t ".entry_role", :relation_name => linked_name, :relation_role => h(containing_relation.member_role)
+ t ".entry_role_html", :relation_name => linked_name, :relation_role => h(containing_relation.member_role)
end %>
diff --git a/app/views/browse/_relation_member.html.erb b/app/views/browse/_relation_member.html.erb
index bb37bdf21..fe0f36357 100644
--- a/app/views/browse/_relation_member.html.erb
+++ b/app/views/browse/_relation_member.html.erb
@@ -3,8 +3,8 @@
type_str = t ".type." + relation_member.member_type.downcase %>
<%= if relation_member.member_role.blank?
- raw t ".entry", :type => type_str, :name => linked_name
+ t ".entry_html", :type => type_str, :name => linked_name
else
- raw t ".entry_role", :type => type_str, :name => linked_name, :role => h(relation_member.member_role)
+ t ".entry_role_html", :type => type_str, :name => linked_name, :role => h(relation_member.member_role)
end %>
diff --git a/app/views/browse/_way.html.erb b/app/views/browse/_way.html.erb
index ed206c59b..5560344a8 100644
--- a/app/views/browse/_way.html.erb
+++ b/app/views/browse/_way.html.erb
@@ -25,7 +25,7 @@
<%= link_to printable_name(wn.node), { :action => "node", :id => wn.node_id.to_s }, { :class => link_class("node", wn.node), :title => link_title(wn.node), :rel => link_follow(wn.node) } %>
<% related_ways = wn.node.ways.reject { |w| w.id == wn.way_id } %>
<% if related_ways.size > 0 then %>
- (<%= raw t ".also_part_of", :count => related_ways.size, :related_ways => related_ways.map { |w| link_to(printable_name(w), { :action => "way", :id => w.id.to_s }, { :class => link_class("way", w), :title => link_title(w) }) }.to_sentence %>)
+ (<%= t ".also_part_of_html", :count => related_ways.size, :related_ways => to_sentence(related_ways.map { |w| link_to(printable_name(w), { :action => "way", :id => w.id.to_s }, { :class => link_class("way", w), :title => link_title(w) }) }) %>)
<% end %>
<% end %>
diff --git a/app/views/browse/feature.html.erb b/app/views/browse/feature.html.erb
index 6c94b0a9d..7dfccb290 100644
--- a/app/views/browse/feature.html.erb
+++ b/app/views/browse/feature.html.erb
@@ -2,7 +2,7 @@
- <%= raw t("browse.#{@type}.title", :name => printable_name(@feature)) %>
+ <%= t("browse.#{@type}.title_html", :name => printable_name(@feature)) %>
<%= render :partial => @type, :object => @feature %>
diff --git a/app/views/browse/history.html.erb b/app/views/browse/history.html.erb
index 0a2c1811c..95b3fd317 100644
--- a/app/views/browse/history.html.erb
+++ b/app/views/browse/history.html.erb
@@ -2,7 +2,7 @@
- <%= raw t("browse.#{@type}.history_title", :name => printable_name(@feature)) %>
+ <%= t("browse.#{@type}.history_title_html", :name => printable_name(@feature)) %>
<%= render :partial => @type, :collection => @feature.send("old_#{@type}s").reverse %>
diff --git a/app/views/diary_entries/_diary_comment.html.erb b/app/views/diary_entries/_diary_comment.html.erb
index 639ac9a19..3893072ad 100644
--- a/app/views/diary_entries/_diary_comment.html.erb
+++ b/app/views/diary_entries/_diary_comment.html.erb
@@ -1,6 +1,6 @@
diff --git a/app/views/diary_entries/show.html.erb b/app/views/diary_entries/show.html.erb
index 1cc1e1c53..d8f4cd8f5 100644
--- a/app/views/diary_entries/show.html.erb
+++ b/app/views/diary_entries/show.html.erb
@@ -29,7 +29,7 @@
<%= link_to t("javascripts.changesets.show.subscribe"), diary_entry_subscribe_path(:display_name => @entry.user.display_name, :id => @entry.id), :method => :post, :class => :button %>
<% end %>
<% else %>
-
+
<% end %>
diff --git a/app/views/geocoder/search.html.erb b/app/views/geocoder/search.html.erb
index 3eb9561a2..13144d568 100644
--- a/app/views/geocoder/search.html.erb
+++ b/app/views/geocoder/search.html.erb
@@ -5,7 +5,7 @@
<%= t("site.sidebar.search_results") %>
<% @sources.each do |source| %>
- <%= raw(t(".title.#{source}")) %>
+ <%= t(".title.#{source}_html") %>
">
<%= image_tag "searching.gif", :class => "loader" %>
diff --git a/app/views/messages/inbox.html.erb b/app/views/messages/inbox.html.erb
index 40bb8e8a3..c3065f911 100644
--- a/app/views/messages/inbox.html.erb
+++ b/app/views/messages/inbox.html.erb
@@ -24,5 +24,5 @@
<% else %>
- <%= raw(t(".no_messages_yet", :people_mapping_nearby_link => link_to(t(".people_mapping_nearby"), user_path(current_user)))) %>
+ <%= t(".no_messages_yet_html", :people_mapping_nearby_link => link_to(t(".people_mapping_nearby"), user_path(current_user))) %>
<% end %>
diff --git a/app/views/messages/new.html.erb b/app/views/messages/new.html.erb
index 2429feb52..2aac33efa 100644
--- a/app/views/messages/new.html.erb
+++ b/app/views/messages/new.html.erb
@@ -1,5 +1,5 @@
<% content_for :heading do %>
- <%= raw(t(".send_message_to", :name => link_to(h(@message.recipient.display_name), user_path(@message.recipient)))) %>
+ <%= t(".send_message_to_html", :name => link_to(h(@message.recipient.display_name), user_path(@message.recipient))) %>
<% end %>
<%= error_messages_for "message" %>
diff --git a/app/views/messages/outbox.html.erb b/app/views/messages/outbox.html.erb
index a06e18838..806f1207a 100644
--- a/app/views/messages/outbox.html.erb
+++ b/app/views/messages/outbox.html.erb
@@ -3,7 +3,7 @@
<% end %>
<% content_for :heading do %>
- <%= raw(t(".my_inbox", :inbox_link => link_to(t(".inbox"), inbox_messages_path))) %>/<%= t ".outbox" %>
+ <%= t(".my_inbox_html", :inbox_link => link_to(t(".inbox"), inbox_messages_path)) %>/<%= t ".outbox" %>
<% end %>
<%= t ".messages", :count => current_user.sent_messages.size %>
@@ -23,5 +23,5 @@
<% else %>
- <%= raw(t(".no_sent_messages", :people_mapping_nearby_link => link_to(t(".people_mapping_nearby"), user_path(current_user)))) %>
+ <%= t(".no_sent_messages_html", :people_mapping_nearby_link => link_to(t(".people_mapping_nearby"), user_path(current_user))) %>
<% end %>
diff --git a/app/views/oauth/authorize.html.erb b/app/views/oauth/authorize.html.erb
index c480b4c99..5fd3c2fee 100644
--- a/app/views/oauth/authorize.html.erb
+++ b/app/views/oauth/authorize.html.erb
@@ -2,7 +2,7 @@
<%= t ".title" %>
<% end %>
-<%= raw t(".request_access", :app_name => link_to(@token.client_application.name, @token.client_application.url), :user => link_to(current_user.display_name, user_path(current_user))) %>
+<%= t(".request_access_html", :app_name => link_to(@token.client_application.name, @token.client_application.url), :user => link_to(current_user.display_name, user_path(current_user))) %>
<%= form_tag authorize_url do %>
<%= hidden_field_tag "oauth_token", @token.token %>
diff --git a/app/views/oauth/authorize_success.html.erb b/app/views/oauth/authorize_success.html.erb
index 9c817372f..63239a386 100644
--- a/app/views/oauth/authorize_success.html.erb
+++ b/app/views/oauth/authorize_success.html.erb
@@ -2,7 +2,7 @@
<%= t ".title" %>
<% end %>
-<%= raw t(".allowed", :app_name => link_to(@token.client_application.name, @token.client_application.url)) %>
+<%= t(".allowed_html", :app_name => link_to(@token.client_application.name, @token.client_application.url)) %>
<% if @token.oob? and not @token.oauth10? %>
<%= t ".verification", :code => @token.verifier %>
diff --git a/app/views/oauth_clients/index.html.erb b/app/views/oauth_clients/index.html.erb
index 54bb4f9f6..0ce09d57c 100644
--- a/app/views/oauth_clients/index.html.erb
+++ b/app/views/oauth_clients/index.html.erb
@@ -29,7 +29,7 @@
<% end %>
<%= t ".my_apps" %>
<% if @client_applications.empty? %>
-<%= raw(t(".no_apps", :oauth => "OAuth")) %>
+<%= t(".no_apps_html", :oauth => link_to(t(".oauth"), "https://oauth.net")) %>
<% else %>
<%= t ".registered_apps" %>
<% @client_applications.each do |client| %>
diff --git a/app/views/site/_potlatch.html.erb b/app/views/site/_potlatch.html.erb
index 3ebcf7fab..fedecbae8 100644
--- a/app/views/site/_potlatch.html.erb
+++ b/app/views/site/_potlatch.html.erb
@@ -6,5 +6,5 @@
<% data[:lat] = @lat if @lat -%>
<% data[:lon] = @lon if @lon -%>
<% data[:zoom] = @zoom if @zoom -%>
- <%= content_tag :div, raw(t("site.edit.flash_player_required")), :id => "potlatch", :data => data %>
+ <%= content_tag :div, t("site.edit.flash_player_required_html"), :id => "potlatch", :data => data %>
diff --git a/app/views/site/_potlatch2.html.erb b/app/views/site/_potlatch2.html.erb
index 11519c26e..bab612491 100644
--- a/app/views/site/_potlatch2.html.erb
+++ b/app/views/site/_potlatch2.html.erb
@@ -15,5 +15,5 @@
<% end %>
<% data[:locale] = Locale.list(Potlatch2::LOCALES.keys).preferred(preferred_languages).to_s -%>
<% data[:locale_path] = asset_path("potlatch2/locales/#{Potlatch2::LOCALES[data[:locale]]}.swf") -%>
- <%= content_tag :div, raw(t("site.edit.flash_player_required")), :id => "potlatch", :data => data %>
+ <%= content_tag :div, t("site.edit.flash_player_required_html"), :id => "potlatch", :data => data %>
diff --git a/app/views/site/about.html.erb b/app/views/site/about.html.erb
index 15255d9e0..e62af1659 100644
--- a/app/views/site/about.html.erb
+++ b/app/views/site/about.html.erb
@@ -6,7 +6,7 @@
- <%= raw t ".used_by", :name => "OpenStreetMap", :locale => @locale %>
+ <%= t ".used_by_html", :name => content_tag(:span, "OpenStreetMap", :class => "user-name"), :locale => @locale %>
diff --git a/app/views/site/copyright.html.erb b/app/views/site/copyright.html.erb
index feec81c82..75f4e878d 100644
--- a/app/views/site/copyright.html.erb
+++ b/app/views/site/copyright.html.erb
@@ -6,14 +6,14 @@
<%= tag.h1 :lang => @locale, :dir => t("html.dir", :locale => @locale) do %>
<%= t ".native.title" %>
- <%= raw t ".native.text",
- :native_link => link_to(t(".native.native_link"),
- :controller => "site",
- :action => "copyright",
- :copyright_locale => nil),
- :mapping_link => link_to(t(".native.mapping_link"),
- :controller => "site",
- :action => "index") %>
+ <%= t ".native.html",
+ :native_link => link_to(t(".native.native_link"),
+ :controller => "site",
+ :action => "copyright",
+ :copyright_locale => nil),
+ :mapping_link => link_to(t(".native.mapping_link"),
+ :controller => "site",
+ :action => "index") %>
<% end %>
@@ -24,11 +24,11 @@
<% if t(".legal_babble", :locale => @locale) != t(".legal_babble", :locale => :en) %>
<%= t ".foreign.title" %>
- <%= raw t ".foreign.text",
- :english_original_link => link_to(t(".foreign.english_link"),
- :controller => "site",
- :action => "copyright",
- :copyright_locale => "en") %>
+ <%= t ".foreign.html",
+ :english_original_link => link_to(t(".foreign.english_link"),
+ :controller => "site",
+ :action => "copyright",
+ :copyright_locale => "en") %>
<% end %>
diff --git a/app/views/site/edit.html.erb b/app/views/site/edit.html.erb
index 1dba95e5d..d991adf39 100644
--- a/app/views/site/edit.html.erb
+++ b/app/views/site/edit.html.erb
@@ -5,8 +5,8 @@
<%= t "layouts.osm_read_only" %>
<% elsif !current_user.data_public? %>
<%= t ".not_public" %>
-
<%= raw t ".not_public_description", :user_page => (link_to t(".user_page_link"), :controller => "users", :action => "account", :display_name => current_user.display_name, :anchor => "public") %>
-
<%= raw t "site.edit.anon_edits", :link => link_to(t(".anon_edits_link_text"), t(".anon_edits_link")) %>
+
<%= t ".not_public_description_html", :user_page => (link_to t(".user_page_link"), :controller => "users", :action => "account", :display_name => current_user.display_name, :anchor => "public") %>
+
<%= t ".anon_edits_html", :link => link_to(t(".anon_edits_link_text"), t(".anon_edits_link")) %>
<% else %>
<%= render :partial => preferred_editor %>
<% end %>
diff --git a/app/views/site/export.html.erb b/app/views/site/export.html.erb
index 4af1a0ff3..f1eed33cf 100644
--- a/app/views/site/export.html.erb
+++ b/app/views/site/export.html.erb
@@ -21,7 +21,7 @@
<%= t ".licence" %>
- <%= raw t ".export_details" %>
+ <%= t ".export_details_html" %>
diff --git a/app/views/traces/_trace.html.erb b/app/views/traces/_trace.html.erb
index 8b754a591..47860d50d 100644
--- a/app/views/traces/_trace.html.erb
+++ b/app/views/traces/_trace.html.erb
@@ -30,7 +30,7 @@
<%= t ".by" %> <%= link_to h(trace.user.display_name), user_path(trace.user) %>
<% if !trace.tags.empty? %>
<%= t ".in" %>
- <%= raw(trace.tags.collect { |tag| link_to_tag tag.tag }.join(", ")) %>
+ <%= safe_join(trace.tags.collect { |tag| link_to_tag tag.tag }, ", ") %>
<% end %>
diff --git a/app/views/traces/show.html.erb b/app/views/traces/show.html.erb
index 728b29c45..e049797a8 100644
--- a/app/views/traces/show.html.erb
+++ b/app/views/traces/show.html.erb
@@ -40,7 +40,7 @@
<%= t ".tags" %> |
<% unless @trace.tags.empty? %>
- <%= raw(@trace.tags.collect { |tag| link_to tag.tag, :controller => "traces", :action => "index", :tag => tag.tag, :id => nil }.join(", ")) %>
+ <%= safe_join(@trace.tags.collect { |tag| link_to tag.tag, :controller => "traces", :action => "index", :tag => tag.tag, :id => nil }, ", ") %>
<% else %>
<%= t ".none" %>
<% end %>
diff --git a/app/views/user_blocks/blocks_by.html.erb b/app/views/user_blocks/blocks_by.html.erb
index 284052a7b..6b4e60daa 100644
--- a/app/views/user_blocks/blocks_by.html.erb
+++ b/app/views/user_blocks/blocks_by.html.erb
@@ -1,6 +1,6 @@
<% @title = t(".title", :name => h(@user.display_name)) %>
<% content_for :heading do %>
- <%= raw(t(".heading", :name => link_to(h(@user.display_name), user_path(@user)))) %>
+ <%= t(".heading_html", :name => link_to(@user.display_name, user_path(@user))) %>
<% end %>
<% unless @user_blocks.empty? %>
diff --git a/app/views/user_blocks/blocks_on.html.erb b/app/views/user_blocks/blocks_on.html.erb
index bb71d48c8..cfdc9abf1 100644
--- a/app/views/user_blocks/blocks_on.html.erb
+++ b/app/views/user_blocks/blocks_on.html.erb
@@ -1,6 +1,6 @@
<% @title = t(".title", :name => h(@user.display_name)) %>
<% content_for :heading do %>
- <%= raw(t(".heading", :name => link_to(h(@user.display_name), user_path(@user)))) %>
+ <%= t(".heading_html", :name => link_to(@user.display_name, user_path(@user))) %>
<% end %>
<% unless @user_blocks.empty? %>
<%= render :partial => "blocks", :locals => { :show_revoke_link => can?(:revoke, UserBlock), :show_user_name => false, :show_creator_name => true } %>
diff --git a/app/views/user_blocks/edit.html.erb b/app/views/user_blocks/edit.html.erb
index 88d7e4f23..69ab5f9f3 100644
--- a/app/views/user_blocks/edit.html.erb
+++ b/app/views/user_blocks/edit.html.erb
@@ -1,8 +1,8 @@
<% @title = t ".title", :name => h(@user_block.user.display_name) %>
<% content_for :heading do %>
- <%= raw t(".title",
- :name => link_to(h(@user_block.user.display_name),
- user_path(@user_block.user))) %>
+ <%= t(".heading_html",
+ :name => link_to(@user_block.user.display_name,
+ user_path(@user_block.user))) %>
- <%= link_to t(".show"), @user_block %>
- <%= link_to t(".back"), user_blocks_path %>
diff --git a/app/views/user_blocks/new.html.erb b/app/views/user_blocks/new.html.erb
index bd492a354..18b03eda9 100644
--- a/app/views/user_blocks/new.html.erb
+++ b/app/views/user_blocks/new.html.erb
@@ -1,8 +1,8 @@
<% @title = t ".title", :name => h(@user.display_name) %>
<% content_for :heading do %>
- <%= raw t(".heading",
- :name => link_to(h(@user.display_name),
- user_path(@user))) %>
+ <%= t(".heading_html",
+ :name => link_to(@user.display_name,
+ user_path(@user))) %>
<% end %>
<%= form_for(@user_block) do |f| %>
<%= f.error_messages %>
diff --git a/app/views/user_blocks/revoke.html.erb b/app/views/user_blocks/revoke.html.erb
index 9bd7df5ae..df48747dd 100644
--- a/app/views/user_blocks/revoke.html.erb
+++ b/app/views/user_blocks/revoke.html.erb
@@ -3,11 +3,11 @@
:block_by => h(@user_block.creator.display_name)) %>
<% content_for :heading do %>
- <%= raw t(".heading",
- :block_on => link_to(h(@user_block.user.display_name),
- user_path(@user_block.user)),
- :block_by => link_to(h(@user_block.creator.display_name),
- user_path(@user_block.creator))) %>
+ <%= t(".heading_html",
+ :block_on => link_to(@user_block.user.display_name,
+ user_path(@user_block.user)),
+ :block_by => link_to(@user_block.creator.display_name,
+ user_path(@user_block.creator))) %>
<% end %>
<% if @user_block.ends_at > Time.now %>
diff --git a/app/views/user_blocks/show.html.erb b/app/views/user_blocks/show.html.erb
index 7e225bf14..6bfb412ef 100644
--- a/app/views/user_blocks/show.html.erb
+++ b/app/views/user_blocks/show.html.erb
@@ -3,11 +3,11 @@
:block_by => @user_block.creator.display_name) %>
<% content_for :heading do %>
- <%= raw t(".heading",
- :block_on => link_to(h(@user_block.user.display_name),
- user_path(@user_block.user)),
- :block_by => link_to(h(@user_block.creator.display_name),
- user_path(@user_block.creator))) %>
+ <%= t(".heading_html",
+ :block_on => link_to(@user_block.user.display_name,
+ user_path(@user_block.user)),
+ :block_by => link_to(@user_block.creator.display_name,
+ user_path(@user_block.creator))) %>
<% if @user_block.ends_at > Time.now.getutc %>
<% if current_user and current_user.id == @user_block.creator_id %>
diff --git a/app/views/users/_user.html.erb b/app/views/users/_user.html.erb
index beff4b0ae..c8fd4ac9e 100644
--- a/app/views/users/_user.html.erb
+++ b/app/views/users/_user.html.erb
@@ -7,14 +7,14 @@
<% if user.creation_ip %>
- <%= raw t "users.index.summary",
- :name => link_to(h(user.display_name), user_path(user)),
- :ip_address => link_to(user.creation_ip, :ip => user.creation_ip),
- :date => l(user.creation_time, :format => :friendly) %>
+ <%= t "users.index.summary_html",
+ :name => link_to(h(user.display_name), user_path(user)),
+ :ip_address => link_to(user.creation_ip, :ip => user.creation_ip),
+ :date => l(user.creation_time, :format => :friendly) %>
<% else %>
- <%= raw t "users.index.summary_no_ip",
- :name => link_to(h(user.display_name), user_path(user)),
- :date => l(user.creation_time, :format => :friendly) %>
+ <%= t "users.index.summary_no_ip_html",
+ :name => link_to(h(user.display_name), user_path(user)),
+ :date => l(user.creation_time, :format => :friendly) %>
<% end %>
<%= user.description.to_html %>
diff --git a/app/views/users/account.html.erb b/app/views/users/account.html.erb
index 7fd6929ca..4021e5c08 100644
--- a/app/views/users/account.html.erb
+++ b/app/views/users/account.html.erb
@@ -175,6 +175,6 @@
<% unless current_user.data_public? %>
<%= t ".public editing note.heading" %>
-<%= raw t ".public editing note.text" %>
+<%= t ".public editing note.html" %>
<%= button_to t(".make edits public button"), :action => :go_public %>
<% end %>
diff --git a/app/views/users/blocked.html.erb b/app/views/users/blocked.html.erb
index 2b2ff06f6..5e6505cac 100644
--- a/app/views/users/blocked.html.erb
+++ b/app/views/users/blocked.html.erb
@@ -6,5 +6,5 @@
<%= t "users.new.no_auto_account_create" %>
- <%= raw t "users.new.contact_webmaster", :webmaster => "mailto:#{Settings.support_email}" %>
+ <%= t "users.new.contact_webmaster_html", :webmaster => "mailto:#{Settings.support_email}" %>
diff --git a/app/views/users/login.html.erb b/app/views/users/login.html.erb
index 9bfa23cbc..b10a2b291 100644
--- a/app/views/users/login.html.erb
+++ b/app/views/users/login.html.erb
@@ -74,7 +74,7 @@
- <%= raw(t(".not displayed publicly")) %>
+ <%= t(".not_displayed_publicly_html") %>
| |
<%= raw(t(".comment_from", :link_user => (link_to h(diary_comment.user.display_name), user_path(diary_comment.user)), :comment_created_at => link_to(l(diary_comment.created_at, :format => :friendly), :anchor => "comment#{diary_comment.id}"))) %> +
<%= t(".comment_from_html", :link_user => (link_to h(diary_comment.user.display_name), user_path(diary_comment.user)), :comment_created_at => link_to(l(diary_comment.created_at, :format => :friendly), :anchor => "comment#{diary_comment.id}")) %> <% if current_user and diary_comment.user.id != current_user.id %> | <%= report_link(t(".report"), diary_comment) %> <% end %> diff --git a/app/views/diary_entries/_diary_entry.html.erb b/app/views/diary_entries/_diary_entry.html.erb index ef983ebde..5508817a8 100644 --- a/app/views/diary_entries/_diary_entry.html.erb +++ b/app/views/diary_entries/_diary_entry.html.erb @@ -7,7 +7,7 @@
<%= link_to h(diary_entry.title), diary_entry_path(diary_entry.user, diary_entry) %>
- <%= raw(t(".posted_by", :link_user => (link_to h(diary_entry.user.display_name), user_path(diary_entry.user)), :created => l(diary_entry.created_at, :format => :blog), :language_link => (link_to h(diary_entry.language.name), :controller => "diary_entries", :action => "index", :display_name => nil, :language => diary_entry.language_code))) %> + <%= t(".posted_by_html", :link_user => (link_to h(diary_entry.user.display_name), user_path(diary_entry.user)), :created => l(diary_entry.created_at, :format => :blog), :language_link => (link_to diary_entry.language.name, :controller => "diary_entries", :action => "index", :display_name => nil, :language => diary_entry.language_code)) %>