]> git.openstreetmap.org Git - rails.git/blobdiff - lib/rich_text.rb
Merge remote-tracking branch 'upstream/pull/2970' into master
[rails.git] / lib / rich_text.rb
index 2b3e07d6acb72b0221379ea0d0a80c681f383b78..8950c68888bafd65f2f61355164838ef29d39508 100644 (file)
@@ -37,7 +37,7 @@ module RichText
           link_size += link.content.length
         end
 
-        link_proportion = link_size.to_f / doc.content.length.to_f
+        link_proportion = link_size.to_f / doc.content.length
       end
 
       spammy_phrases = SPAMMY_PHRASES.count do |phrase|
@@ -61,9 +61,9 @@ module RichText
 
     def linkify(text, mode = :urls)
       if text.html_safe?
-        Rinku.auto_link(text, mode, tag_builder.tag_options(:rel => "nofollow noopener noreferer")).html_safe
+        Rinku.auto_link(text, mode, tag_builder.tag_options(:rel => "nofollow noopener noreferrer")).html_safe
       else
-        Rinku.auto_link(text, mode, tag_builder.tag_options(:rel => "nofollow noopener noreferer"))
+        Rinku.auto_link(text, mode, tag_builder.tag_options(:rel => "nofollow noopener noreferrer"))
       end
     end
   end