diff options
author | Jenkins <jenkins@jenkins.ninjawedding.org> | 2018-01-03 20:17:13 +0000 |
---|---|---|
committer | Jenkins <jenkins@jenkins.ninjawedding.org> | 2018-01-03 20:17:13 +0000 |
commit | fc884d015a1a2d6c31976af3d63039390fa15939 (patch) | |
tree | 0cb950fd716f3f2cb9f13348cf42fb6e4bc8b909 /app/lib/formatter.rb | |
parent | 933840bebf4ce8f5282c88e8c3e8c1b3675fbf2d (diff) | |
parent | d907d4352e9b6cb22bc1fabd42ca3fc60aef8a37 (diff) |
Merge remote-tracking branch 'tootsuite/master' into glitchsoc/master
Diffstat (limited to 'app/lib/formatter.rb')
-rw-r--r-- | app/lib/formatter.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/lib/formatter.rb b/app/lib/formatter.rb index f5bf64cc7..8c0f8cebc 100644 --- a/app/lib/formatter.rb +++ b/app/lib/formatter.rb @@ -171,10 +171,10 @@ class Formatter end def link_to_url(entity) - normalized_url = Addressable::URI.parse(entity[:url]).normalize - html_attrs = { target: '_blank', rel: 'nofollow noopener' } + url = Addressable::URI.parse(entity[:url]) + html_attrs = { target: '_blank', rel: 'nofollow noopener' } - Twitter::Autolink.send(:link_to_text, entity, link_html(entity[:url]), normalized_url, html_attrs) + Twitter::Autolink.send(:link_to_text, entity, link_html(entity[:url]), url, html_attrs) rescue Addressable::URI::InvalidURIError, IDN::Idna::IdnaError encode(entity[:url]) end |