From 46c3c826c4c0f1987f616b287a06bf9412c184be Mon Sep 17 00:00:00 2001 From: =?utf8?q?=C5=A0tefan=20Baebler?= Date: Mon, 19 Mar 2018 09:38:39 +0100 Subject: [PATCH] Disabled OutputSafety rubocop rule just for the line, not whole browse_helper.rb --- .rubocop_todo.yml | 3 +-- app/helpers/browse_helper.rb | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 2fbbb2240..2c8d29eb8 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -159,12 +159,11 @@ Rails/NotNullColumn: - 'db/migrate/025_add_end_time_to_changesets.rb' - 'db/migrate/20120404205604_add_user_and_description_to_redaction.rb' -# Offense count: 21 +# Offense count: 20 Rails/OutputSafety: Exclude: - 'app/controllers/user_controller.rb' - 'app/helpers/application_helper.rb' - - 'app/helpers/browse_helper.rb' - 'app/helpers/changeset_helper.rb' - 'app/helpers/geocoder_helper.rb' - 'app/helpers/note_helper.rb' diff --git a/app/helpers/browse_helper.rb b/app/helpers/browse_helper.rb index 17de962fe..1fce5f0b3 100644 --- a/app/helpers/browse_helper.rb +++ b/app/helpers/browse_helper.rb @@ -77,7 +77,7 @@ module BrowseHelper elsif url = telephone_link(key, value) link_to h(value), url, :title => t("browse.tag_details.telephone_link", :phone_number => value) elsif colour_value = colour_preview(key, value) - %(
#{h(value)} ).html_safe + %(
#{h(value)} ).html_safe # rubocop:disable Rails/OutputSafety else linkify h(value) end -- 2.39.5