X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/774a8dd5f9ed6e6c24c30b36dc8c1a13a4030127..690cfb5eafc214d1a29a7ed6f6a74a51369172d8:/lib/rich_text.rb diff --git a/lib/rich_text.rb b/lib/rich_text.rb index 8950c6888..56d358bd8 100644 --- a/lib/rich_text.rb +++ b/lib/rich_text.rb @@ -15,7 +15,7 @@ module RichText 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 @@ -44,9 +44,9 @@ module RichText 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