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|
def linkify(text, mode = :urls)
if text.html_safe?
- Rinku.auto_link(text, mode, tag_builder.tag_options(:rel => "nofollow")).html_safe
+ Rinku.auto_link(text, mode, tag_builder.tag_options(:rel => "nofollow noopener noreferer")).html_safe
else
- Rinku.auto_link(text, mode, tag_builder.tag_options(:rel => "nofollow"))
+ Rinku.auto_link(text, mode, tag_builder.tag_options(:rel => "nofollow noopener noreferer"))
end
end
end