diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 71cad88..6b3dfa2 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -1055,13 +1055,11 @@ module ApplicationHelper end def delete_article_message(article) - CGI.escapeHTML( - if article.folder? - _("Are you sure that you want to remove the folder \"%s\"? Note that all the items inside it will also be removed!") % article.name - else - _("Are you sure that you want to remove the item \"%s\"?") % article.name - end - ) + if article.folder? + _("Are you sure that you want to remove the folder \"%s\"? Note that all the items inside it will also be removed!") % article.name + else + _("Are you sure that you want to remove the item \"%s\"?") % article.name + end end def expirable_link_to(expired, content, url, options = {}) diff --git a/app/helpers/article_helper.rb b/app/helpers/article_helper.rb index 861ce0b..1786138 100644 --- a/app/helpers/article_helper.rb +++ b/app/helpers/article_helper.rb @@ -69,14 +69,14 @@ module ArticleHelper content_tag('div', content_tag('div', radio_button(:article, :published, true) + - content_tag('span', ' ', :class => 'access-public-icon') + + content_tag('span', ' '.html_safe, :class => 'access-public-icon') + content_tag('label', _('Public'), :for => 'article_published_true') + content_tag('span', _('Visible to other people'), :class => 'access-note'), :class => 'access-item' ) + content_tag('div', radio_button(:article, :published, false) + - content_tag('span', ' ', :class => 'access-private-icon') + + content_tag('span', ' '.html_safe, :class => 'access-private-icon') + content_tag('label', _('Private'), :for => 'article_published_false', :id => "label_private") + content_tag('span', _('Limit visibility of this article'), :class => 'access-note'), :class => 'access-item' diff --git a/app/helpers/boxes_helper.rb b/app/helpers/boxes_helper.rb index 9952acd..67eb70f 100644 --- a/app/helpers/boxes_helper.rb +++ b/app/helpers/boxes_helper.rb @@ -34,7 +34,7 @@ module BoxesHelper def display_boxes_editor(holder) with_box_decorator self do - content_tag('div', display_boxes(holder, '<' + _('Main content') + '>'), :id => 'box-organizer') + content_tag('div', display_boxes(holder, '<' + _('Main content') + '>'), :id => 'box-organizer') end end @@ -52,7 +52,7 @@ module BoxesHelper def maybe_display_custom_element(holder, element, options = {}) if holder.respond_to?(element) - content_tag('div', holder.send(element), options) + content_tag('div', holder.send(element).to_s.html_safe, options) else ''.html_safe end @@ -64,7 +64,7 @@ module BoxesHelper def display_updated_box(box) with_box_decorator self do - display_box_content(box, '<' + _('Main content') + '>') + display_box_content(box, '<' + _('Main content') + '>') end end diff --git a/app/helpers/categories_helper.rb b/app/helpers/categories_helper.rb index 8a47344..30f7c71 100644 --- a/app/helpers/categories_helper.rb +++ b/app/helpers/categories_helper.rb @@ -20,7 +20,7 @@ module CategoriesHelper def selected_category_link(cat) js_remove = "jQuery('#selected-category-#{cat.id}').remove();" content_tag('div', button_to_function_without_text(:remove, _('Remove'), js_remove) + - link_to_function(cat.full_name(' → '), js_remove, :id => "remove-selected-category-#{cat.id}-button", :class => 'select-subcategory-link'), + link_to_function(cat.full_name(' → ').html_safe, js_remove, :id => "remove-selected-category-#{cat.id}-button", :class => 'select-subcategory-link'), :class => 'selected-category' ) end diff --git a/app/helpers/profile_helper.rb b/app/helpers/profile_helper.rb index 14ce947..fe4ee6f 100644 --- a/app/helpers/profile_helper.rb +++ b/app/helpers/profile_helper.rb @@ -84,7 +84,7 @@ module ProfileHelper entries.map do |entry| content = self.send("treat_#{field}", entry) unless content.blank? - content_tag('tr', content_tag('td', title(field, entry), :class => 'field-name') + content_tag('td', content)) + content_tag('tr', content_tag('td', title(field, entry), :class => 'field-name') + content_tag('td', content.to_s.html_safe)) end end.join("\n") end diff --git a/app/views/blocks/raw_html.html.erb b/app/views/blocks/raw_html.html.erb index 640d7ae..2a1db22 100644 --- a/app/views/blocks/raw_html.html.erb +++ b/app/views/blocks/raw_html.html.erb @@ -1,3 +1,3 @@ <%= block_title(block.title, block.subtitle) %> -<%=h block.html %> +<%= block.html.html_safe %> diff --git a/app/views/friends/_profile_list.html.erb b/app/views/friends/_profile_list.html.erb index acfd6b2..7351f40 100644 --- a/app/views/friends/_profile_list.html.erb +++ b/app/views/friends/_profile_list.html.erb @@ -1,7 +1,7 @@