X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/9492d20a8752763c06952f600d3f5703be4fdc8a..34e3e51456774127d43408b7ab65c24f41373f62:/lib/rich_text.rb diff --git a/lib/rich_text.rb b/lib/rich_text.rb index 2b7e31009..4cd254720 100644 --- a/lib/rich_text.rb +++ b/lib/rich_text.rb @@ -10,6 +10,7 @@ module RichText class SimpleFormat include ActionView::Helpers::TextHelper + include ActionView::Helpers::OutputSafetyHelper def sanitize(text) Sanitize.clean(text, Sanitize::Config::OSM).html_safe @@ -36,7 +37,7 @@ module RichText link_proportion = 0 end - return [link_proportion - 0.2, 0.0].max * 200 + link_count * 20 + return [link_proportion - 0.2, 0.0].max * 200 + link_count * 40 end protected @@ -101,7 +102,7 @@ module RichText else "#{link}" end - end + end end end