logo

mastofe

My custom branche(s) on git.pleroma.social/pleroma/mastofe
commit: 9ba7d526a0712afa073c6901bf2e69bae0dfab26
parent: 94e233e7b2921044754babc82b5448ac2e3bfd23
Author: TheKinrar <contact@thekinrar.fr>
Date:   Wed,  2 Aug 2017 14:54:33 +0200

Don't normalize invalid domain names (#4499)

Fixes #4496

Diffstat:

Mapp/lib/formatter.rb2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 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