diff options
Diffstat (limited to 'app')
-rw-r--r-- | app/lib/formatter.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/app/lib/formatter.rb b/app/lib/formatter.rb index c0f7866bf..e7bb0743d 100644 --- a/app/lib/formatter.rb +++ b/app/lib/formatter.rb @@ -11,6 +11,8 @@ class HTMLRenderer < Redcarpet::Render::HTML def autolink(link, link_type) return link if link_type == :email Formatter.instance.link_url(link) + rescue Addressable::URI::InvalidURIError, IDN::Idna::IdnaError + encode(link) end private |