about summary refs log tree commit diff
path: root/app/lib/formatter.rb
diff options
context:
space:
mode:
authorJenkins <jenkins@jenkins.ninjawedding.org>2018-01-03 20:17:13 +0000
committerJenkins <jenkins@jenkins.ninjawedding.org>2018-01-03 20:17:13 +0000
commitfc884d015a1a2d6c31976af3d63039390fa15939 (patch)
tree0cb950fd716f3f2cb9f13348cf42fb6e4bc8b909 /app/lib/formatter.rb
parent933840bebf4ce8f5282c88e8c3e8c1b3675fbf2d (diff)
parentd907d4352e9b6cb22bc1fabd42ca3fc60aef8a37 (diff)
Merge remote-tracking branch 'tootsuite/master' into glitchsoc/master
Diffstat (limited to 'app/lib/formatter.rb')
-rw-r--r--app/lib/formatter.rb6
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