Skip to content
Snippets Groups Projects
Commit 9ba7d526 authored by TheKinrar's avatar TheKinrar Committed by Eugen Rochko
Browse files

Don't normalize invalid domain names (#4499)

Fixes #4496
parent 94e233e7
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment