about summary refs log tree commit diff
path: root/app
diff options
context:
space:
mode:
authorTheKinrar <contact@thekinrar.fr>2017-08-02 14:54:33 +0200
committerEugen Rochko <eugen@zeonfederated.com>2017-08-02 14:54:33 +0200
commit9ba7d526a0712afa073c6901bf2e69bae0dfab26 (patch)
tree177bfeeb202118b96fe14aaeaac83e247cfcdbca /app
parent94e233e7b2921044754babc82b5448ac2e3bfd23 (diff)
Don't normalize invalid domain names (#4499)
Fixes #4496
Diffstat (limited to 'app')
-rw-r--r--app/lib/formatter.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/lib/formatter.rb b/app/lib/formatter.rb
index 7b89305ac..cacc0364f 100644
--- a/app/lib/formatter.rb
+++ b/app/lib/formatter.rb
@@ -104,7 +104,7 @@ class Formatter
     html_attrs     = { target: '_blank', rel: 'nofollow noopener' }
 
     Twitter::Autolink.send(:link_to_text, entity, link_html(entity[:url]), normalized_url, html_attrs)
-  rescue Addressable::URI::InvalidURIError
+  rescue Addressable::URI::InvalidURIError, IDN::Idna::IdnaError
     encode(entity[:url])
   end