diff --git a/app/helpers/text_with_links_helper.rb b/app/helpers/text_with_links_helper.rb index b7c235d29..c7ce43af2 100644 --- a/app/helpers/text_with_links_helper.rb +++ b/app/helpers/text_with_links_helper.rb @@ -10,7 +10,7 @@ module TextWithLinksHelper return if html.nil? raise "Could not add links because the content is not safe" unless html.html_safe? - raw Rinku.auto_link(html, :all, 'target="_blank" rel="nofollow"') + raw Rinku.auto_link(html, :all, 'rel="nofollow"') end def simple_format_no_tags_no_sanitize(html) diff --git a/spec/system/comments/budget_investments_spec.rb b/spec/system/comments/budget_investments_spec.rb index f7f643a6c..34489bc3a 100644 --- a/spec/system/comments/budget_investments_spec.rb +++ b/spec/system/comments/budget_investments_spec.rb @@ -167,7 +167,7 @@ describe "Commenting Budget::Investments" do expect(page).to have_content "Built with http://rubyonrails.org/" expect(page).to have_link("http://rubyonrails.org/", href: "http://rubyonrails.org/") expect(find_link("http://rubyonrails.org/")[:rel]).to eq("nofollow") - expect(find_link("http://rubyonrails.org/")[:target]).to eq("_blank") + expect(find_link("http://rubyonrails.org/")[:target]).to be_blank end end diff --git a/spec/system/comments/budget_investments_valuation_spec.rb b/spec/system/comments/budget_investments_valuation_spec.rb index d282f5e1e..ef90d67c9 100644 --- a/spec/system/comments/budget_investments_valuation_spec.rb +++ b/spec/system/comments/budget_investments_valuation_spec.rb @@ -125,7 +125,7 @@ describe "Internal valuation comments on Budget::Investments" do expect(page).to have_content("Check http://rubyonrails.org/") expect(page).to have_link("http://rubyonrails.org/", href: "http://rubyonrails.org/") expect(find_link("http://rubyonrails.org/")[:rel]).to eq("nofollow") - expect(find_link("http://rubyonrails.org/")[:target]).to eq("_blank") + expect(find_link("http://rubyonrails.org/")[:target]).to be_blank end end diff --git a/spec/system/comments/debates_spec.rb b/spec/system/comments/debates_spec.rb index 3242b8943..5a0faf890 100644 --- a/spec/system/comments/debates_spec.rb +++ b/spec/system/comments/debates_spec.rb @@ -170,7 +170,7 @@ describe "Commenting debates" do expect(page).to have_content "Built with http://rubyonrails.org/" expect(page).to have_link("http://rubyonrails.org/", href: "http://rubyonrails.org/") expect(find_link("http://rubyonrails.org/")[:rel]).to eq("nofollow") - expect(find_link("http://rubyonrails.org/")[:target]).to eq("_blank") + expect(find_link("http://rubyonrails.org/")[:target]).to be_blank end end diff --git a/spec/system/comments/legislation_annotations_spec.rb b/spec/system/comments/legislation_annotations_spec.rb index 63b89850b..5a7c88d54 100644 --- a/spec/system/comments/legislation_annotations_spec.rb +++ b/spec/system/comments/legislation_annotations_spec.rb @@ -164,7 +164,7 @@ describe "Commenting legislation questions" do expect(page).to have_content "Built with http://rubyonrails.org/" expect(page).to have_link("http://rubyonrails.org/", href: "http://rubyonrails.org/") expect(find_link("http://rubyonrails.org/")[:rel]).to eq("nofollow") - expect(find_link("http://rubyonrails.org/")[:target]).to eq("_blank") + expect(find_link("http://rubyonrails.org/")[:target]).to be_blank end end diff --git a/spec/system/comments/legislation_questions_spec.rb b/spec/system/comments/legislation_questions_spec.rb index bc50f7610..627e7ed86 100644 --- a/spec/system/comments/legislation_questions_spec.rb +++ b/spec/system/comments/legislation_questions_spec.rb @@ -159,7 +159,7 @@ describe "Commenting legislation questions" do expect(page).to have_content "Built with http://rubyonrails.org/" expect(page).to have_link("http://rubyonrails.org/", href: "http://rubyonrails.org/") expect(find_link("http://rubyonrails.org/")[:rel]).to eq("nofollow") - expect(find_link("http://rubyonrails.org/")[:target]).to eq("_blank") + expect(find_link("http://rubyonrails.org/")[:target]).to be_blank end end diff --git a/spec/system/comments/polls_spec.rb b/spec/system/comments/polls_spec.rb index 8f3d00759..94669c512 100644 --- a/spec/system/comments/polls_spec.rb +++ b/spec/system/comments/polls_spec.rb @@ -148,7 +148,7 @@ describe "Commenting polls" do expect(page).to have_content "Built with http://rubyonrails.org/" expect(page).to have_link("http://rubyonrails.org/", href: "http://rubyonrails.org/") expect(find_link("http://rubyonrails.org/")[:rel]).to eq("nofollow") - expect(find_link("http://rubyonrails.org/")[:target]).to eq("_blank") + expect(find_link("http://rubyonrails.org/")[:target]).to be_blank end end diff --git a/spec/system/comments/proposals_spec.rb b/spec/system/comments/proposals_spec.rb index a2da45137..269b1d885 100644 --- a/spec/system/comments/proposals_spec.rb +++ b/spec/system/comments/proposals_spec.rb @@ -153,7 +153,7 @@ describe "Commenting proposals" do expect(page).to have_content "Built with http://rubyonrails.org/" expect(page).to have_link("http://rubyonrails.org/", href: "http://rubyonrails.org/") expect(find_link("http://rubyonrails.org/")[:rel]).to eq("nofollow") - expect(find_link("http://rubyonrails.org/")[:target]).to eq("_blank") + expect(find_link("http://rubyonrails.org/")[:target]).to be_blank end end diff --git a/spec/system/comments/topics_spec.rb b/spec/system/comments/topics_spec.rb index c41ef234a..022c6bae2 100644 --- a/spec/system/comments/topics_spec.rb +++ b/spec/system/comments/topics_spec.rb @@ -161,7 +161,7 @@ describe "Commenting topics from proposals" do expect(page).to have_content "Built with http://rubyonrails.org/" expect(page).to have_link("http://rubyonrails.org/", href: "http://rubyonrails.org/") expect(find_link("http://rubyonrails.org/")[:rel]).to eq("nofollow") - expect(find_link("http://rubyonrails.org/")[:target]).to eq("_blank") + expect(find_link("http://rubyonrails.org/")[:target]).to be_blank end end @@ -710,7 +710,7 @@ describe "Commenting topics from budget investments" do expect(page).to have_content "Built with http://rubyonrails.org/" expect(page).to have_link("http://rubyonrails.org/", href: "http://rubyonrails.org/") expect(find_link("http://rubyonrails.org/")[:rel]).to eq("nofollow") - expect(find_link("http://rubyonrails.org/")[:target]).to eq("_blank") + expect(find_link("http://rubyonrails.org/")[:target]).to be_blank end end