about summary refs log tree commit diff
path: root/app/validators/url_validator.rb
diff options
context:
space:
mode:
authorpluralcafe-docker <git@plural.cafe>2019-01-12 04:24:14 +0000
committerpluralcafe-docker <git@plural.cafe>2019-01-12 04:24:14 +0000
commitae24ef877b82466cab026a76ea6ed8598ddaae18 (patch)
tree584c25ada377f2e6da49a9b45b3da947501b1831 /app/validators/url_validator.rb
parentfa1ab7fbe4166f3d8b481891dcc443df5aa212bb (diff)
parent2cfa55185a5fc7d93a160a4e9a4730aae6725b0f (diff)
Merge branch 'glitch'
Diffstat (limited to 'app/validators/url_validator.rb')
-rw-r--r--app/validators/url_validator.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/validators/url_validator.rb b/app/validators/url_validator.rb
index f39560d90..d95a03fbf 100644
--- a/app/validators/url_validator.rb
+++ b/app/validators/url_validator.rb
@@ -8,7 +8,7 @@ class UrlValidator < ActiveModel::EachValidator
   private
 
   def compliant?(url)
-    parsed_url = Addressable::URI.parse(url).normalize
-    !parsed_url.nil? && %w(http https).include?(parsed_url.scheme) && parsed_url.host
+    parsed_url = Addressable::URI.parse(url)
+    parsed_url && %w(http https).include?(parsed_url.scheme) && parsed_url.host
   end
 end