about summary refs log tree commit diff
path: root/app/validators/url_validator.rb
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2019-01-05 07:16:46 +0100
committerGitHub <noreply@github.com>2019-01-05 07:16:46 +0100
commit45899cfa691b1e4f43da98c456ae8faa584eb437 (patch)
treeb3bb6355c4cbe8f74b96d463ac5905c5c898cdfa /app/validators/url_validator.rb
parent90398b9d007d10716cb891d341f64018bb60c822 (diff)
Change note length validation to ignore mention domains and URLs (#9717)
Fix #4419
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