diff --git a/lib/validate_url.rb b/lib/validate_url.rb index d77272c..1fc81c3 100644 --- a/lib/validate_url.rb +++ b/lib/validate_url.rb @@ -50,7 +50,7 @@ def filtered_options(value) end def validate_url(record, attribute, value, schemes) - uri = URI.parse(value) + uri = URI.parse(URI::Parser.new.escape(value) host = uri && uri.host scheme = uri && uri.scheme