]> git.openstreetmap.org Git - rails.git/blobdiff - lib/rich_text.rb
Localisation updates from https://translatewiki.net.
[rails.git] / lib / rich_text.rb
index 8950c68888bafd65f2f61355164838ef29d39508..56d358bd8dcb2823afa64a7dcb56e62f5a40d589 100644 (file)
@@ -15,7 +15,7 @@ module RichText
     include ActionView::Helpers::TextHelper
     include ActionView::Helpers::OutputSafetyHelper
 
     include ActionView::Helpers::TextHelper
     include ActionView::Helpers::OutputSafetyHelper
 
-    def sanitize(text)
+    def sanitize(text, _options = {})
       Sanitize.clean(text, Sanitize::Config::OSM).html_safe
     end
   end
       Sanitize.clean(text, Sanitize::Config::OSM).html_safe
     end
   end
@@ -44,9 +44,9 @@ module RichText
         doc.content.include?(phrase)
       end
 
         doc.content.include?(phrase)
       end
 
-      [link_proportion - 0.2, 0.0].max * 200 +
-        link_count * 40 +
-        spammy_phrases * 40
+      ([link_proportion - 0.2, 0.0].max * 200) +
+        (link_count * 40) +
+        (spammy_phrases * 40)
     end
 
     protected
     end
 
     protected