mirror of
https://github.com/openstreetmap/openstreetmap-website.git
synced 2025-07-22 01:22:54 +00:00
Merge remote-tracking branch 'upstream/pull/5850'
This commit is contained in:
@ -25,8 +25,6 @@ module RichText
|
||||
end
|
||||
|
||||
class Base < String
|
||||
include ActionView::Helpers::TagHelper
|
||||
|
||||
def spam_score
|
||||
link_count = 0
|
||||
link_size = 0
|
||||
@ -76,7 +74,7 @@ module RichText
|
||||
end
|
||||
|
||||
def linkify(text, mode = :urls)
|
||||
link_attr = tag_builder.tag_options(:rel => "nofollow noopener noreferrer")
|
||||
link_attr = 'rel="nofollow noopener noreferrer"'
|
||||
Rinku.auto_link(ERB::Util.html_escape(text), mode, link_attr) do |url|
|
||||
url = shorten_host(url, Settings.linkify_hosts, Settings.linkify_hosts_replacement)
|
||||
shorten_host(url, Settings.linkify_wiki_hosts, Settings.linkify_wiki_hosts_replacement)
|
||||
|
Reference in New Issue
Block a user