]> git.openstreetmap.org Git - rails.git/commitdiff
Disabled OutputSafety rubocop rule just for the line, not whole browse_helper.rb
authorŠtefan Baebler <stefan.baebler@gmail.com>
Mon, 19 Mar 2018 08:38:39 +0000 (09:38 +0100)
committerŠtefan Baebler <stefan.baebler@gmail.com>
Mon, 19 Mar 2018 08:38:39 +0000 (09:38 +0100)
.rubocop_todo.yml
app/helpers/browse_helper.rb

index 2fbbb2240d2b6c2de8504844c80af19d23966f31..2c8d29eb887fac048d55a61cfcdb3d34e5138fa3 100644 (file)
@@ -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'
index 17de962fe75a1f53f79084c86a0a48a4b7ba7bfd..1fce5f0b3e296bd979de7052b4f66704d2a58bb9 100644 (file)
@@ -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)
-      %( <div class="colour-preview-box" style="background-color:#{h(value)}" title="#{h(t('browse.tag_details.colour_preview', :colour_value => colour_value))}"></div>#{h(value)} ).html_safe
+      %( <div class="colour-preview-box" style="background-color:#{h(value)}" title="#{h(t('browse.tag_details.colour_preview', :colour_value => colour_value))}"></div>#{h(value)} ).html_safe # rubocop:disable Rails/OutputSafety
     else
       linkify h(value)
     end