diff options
author | TheKinrar <contact@thekinrar.fr> | 2017-08-02 14:54:33 +0200 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2017-08-02 14:54:33 +0200 |
commit | 9ba7d526a0712afa073c6901bf2e69bae0dfab26 (patch) | |
tree | 177bfeeb202118b96fe14aaeaac83e247cfcdbca | |
parent | 94e233e7b2921044754babc82b5448ac2e3bfd23 (diff) |
Don't normalize invalid domain names (#4499)
Fixes #4496
-rw-r--r-- | app/lib/formatter.rb | 2 |
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 |