From: Štefan Baebler Date: Mon, 19 Mar 2018 08:38:39 +0000 (+0100) Subject: Disabled OutputSafety rubocop rule just for the line, not whole browse_helper.rb X-Git-Tag: live~3023^2~10 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/46c3c826c4c0f1987f616b287a06bf9412c184be Disabled OutputSafety rubocop rule just for the line, not whole browse_helper.rb --- 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