]> cat aescling's git repositories - mastodon.git/commitdiff
Fix crash when invalid addresses are linked in HTML or Markdown toots
authorThibaut Girka <thib@sitedethib.com>
Sat, 9 May 2020 13:50:09 +0000 (15:50 +0200)
committerThibG <thib@sitedethib.com>
Sat, 9 May 2020 14:01:00 +0000 (16:01 +0200)
app/lib/tag_manager.rb

index c88cf499474634d50695df18f6a4ed72ec2bedf3..d06bea059377effbaa69e082137dd93f95756352 100644 (file)
@@ -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