From 605725ff76305f9abf1ccebe091489f25409591b Mon Sep 17 00:00:00 2001 From: Alexandre Barbosa Date: Wed, 2 Mar 2016 14:19:26 -0300 Subject: [PATCH] Fixing tests --- app/helpers/application_helper.rb | 10 +++++----- app/helpers/box_organizer_helper.rb | 2 +- app/helpers/boxes_helper.rb | 2 +- app/helpers/language_helper.rb | 2 +- app/models/blog_archives_block.rb | 2 +- app/views/profile/index.html.erb | 2 +- app/views/profile_editor/_organization.html.erb | 2 +- test/functional/profile_controller_test.rb | 2 +- 8 files changed, 12 insertions(+), 12 deletions(-) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 6ad0184..38c90bd 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -567,15 +567,15 @@ module ApplicationHelper links = links_for_balloon(profile) content_tag('div', content_tag(tag, (environment.enabled?(:show_balloon_with_profile_links_when_clicked) ? - popover_menu(_('Profile links'),profile.short_name,links,{:class => trigger_class, :url => url}) : "") + + popover_menu(_('Profile links'),profile.short_name,links,{:class => trigger_class, :url => url}) : "").html_safe + link_to( content_tag( 'span', profile_image( profile, size ), :class => img_class ) + content_tag( 'span', h(name), :class => ( profile.class == Person ? 'fn' : 'org' ) ) + extra_info_tag + profile_sex_icon( profile ), - profile.url, + url, :class => 'profile_link url', :help => _('Click on this icon to go to the %s\'s home page') % profile.name, - :title => profile.name ), + :title => profile.name ).html_safe, :class => 'vcard'), :class => 'common-profile-list-block') end @@ -835,7 +835,7 @@ module ApplicationHelper end else if profile.active_fields.include?(name) - result = content_tag('div', field_html + profile_field_privacy_selector(profile, name), :class => 'field-with-privacy-selector-R1') + result = content_tag('div', field_html + profile_field_privacy_selector(profile, name), :class => 'field-with-privacy-selector') end end @@ -1392,7 +1392,7 @@ module ApplicationHelper html = @plugins.pipeline(:parse_content, html, source).first end - html.html_safe && html + html && html.html_safe end def convert_macro(html, source) diff --git a/app/helpers/box_organizer_helper.rb b/app/helpers/box_organizer_helper.rb index 5003cde..6fff9d4 100644 --- a/app/helpers/box_organizer_helper.rb +++ b/app/helpers/box_organizer_helper.rb @@ -38,7 +38,7 @@ module BoxOrganizerHelper content_tag(:ul, images_path.map do |preview| content_tag(:li, image_tag(preview, height: '240', alt: '')) - end.join("\n") + end.join("\n").html_safe ) end diff --git a/app/helpers/boxes_helper.rb b/app/helpers/boxes_helper.rb index fd20c37..b3272ee 100644 --- a/app/helpers/boxes_helper.rb +++ b/app/helpers/boxes_helper.rb @@ -282,7 +282,7 @@ module BoxesHelper buttons << modal_inline_icon(:embed, _('Embed code'), {}, "#embed-code-box-#{block.id}") << html end - content_tag('div', buttons.join("\n") + tag('br', :style => 'clear: left'), :class => 'button-bar') + content_tag('div', buttons.join("\n").html_safe + tag('br', :style => 'clear: left'), :class => 'button-bar') end def current_blocks diff --git a/app/helpers/language_helper.rb b/app/helpers/language_helper.rb index 889be0c..d52f29e 100644 --- a/app/helpers/language_helper.rb +++ b/app/helpers/language_helper.rb @@ -40,7 +40,7 @@ module LanguageHelper else link_to(name, params.merge(:lang => code), :rel => 'nofollow') end - end.join(separator) + end.join(separator).html_safe content_tag('div', languages, :id => 'language-chooser', :help => _('The language you choose here is the language used for options, buttons, etc. It does not affect the language of the content created by other users.')) end end diff --git a/app/models/blog_archives_block.rb b/app/models/blog_archives_block.rb index 11448b7..356dd06 100644 --- a/app/models/blog_archives_block.rb +++ b/app/models/blog_archives_block.rb @@ -36,7 +36,7 @@ class BlogArchivesBlock < Block results << content_tag('li', content_tag('strong', "#{year.to_i} (#{count})")) results << "" end diff --git a/app/views/profile/index.html.erb b/app/views/profile/index.html.erb index 9f659a4..fb9a430 100644 --- a/app/views/profile/index.html.erb +++ b/app/views/profile/index.html.erb @@ -5,7 +5,7 @@ <% else %> <% unless profile.description.blank? %>
- <%= profile.description %> + <%= raw profile.description %>
<% end %>