Browse Source

Don't normalize invalid domain names (#4499)

Fixes #4496
pull/4/head
TheKinrar 6 years ago
committed by Eugen Rochko
parent
commit
9ba7d526a0
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      app/lib/formatter.rb

+ 1
- 1
app/lib/formatter.rb View File

@ -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

Loading…
Cancel
Save