about summary refs log tree commit diff
diff options
context:
space:
mode:
authorThibaut Girka <thib@sitedethib.com>2020-05-09 15:50:09 +0200
committerThibG <thib@sitedethib.com>2020-05-09 16:01:00 +0200
commitc6ff4c634caf718adf7280e04909c091d15add1d (patch)
treed7ea5e49f7e5cca1eb17da359c27a10042452fe2
parent75b0fa8b760b8829b933b249ac48965abdab15ae (diff)
Fix crash when invalid addresses are linked in HTML or Markdown toots
-rw-r--r--app/lib/tag_manager.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/lib/tag_manager.rb b/app/lib/tag_manager.rb
index c88cf4994..d06bea059 100644
--- a/app/lib/tag_manager.rb
+++ b/app/lib/tag_manager.rb
@@ -35,5 +35,7 @@ class TagManager
     domain = uri.host + (uri.port ? ":#{uri.port}" : '')
 
     TagManager.instance.web_domain?(domain)
+  rescue Addressable::URI::InvalidURIError
+    false
   end
 end