about summary refs log tree commit diff
path: root/app/models/concerns
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/concerns')
-rw-r--r--app/models/concerns/domain_normalizable.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/models/concerns/domain_normalizable.rb b/app/models/concerns/domain_normalizable.rb
index fb84058fc..8e244c1d8 100644
--- a/app/models/concerns/domain_normalizable.rb
+++ b/app/models/concerns/domain_normalizable.rb
@@ -11,5 +11,7 @@ module DomainNormalizable
 
   def normalize_domain
     self.domain = TagManager.instance.normalize_domain(domain&.strip)
+  rescue Addressable::URI::InvalidURIError
+    errors.add(:domain, :invalid)
   end
 end