Commit 54a50bf8 authored by James Lopez's avatar James Lopez
Browse files

refactor url validator to use sanitizer for check

parent 26ce833a
......@@ -35,9 +35,7 @@ def valid_url?(value)
end
def valid_uri?(value)
Addressable::URI.parse(value).is_a?(Addressable::URI)
rescue Addressable::URI::InvalidURIError
false
Gitlab::UrlSanitizer.valid?(value)
end
def valid_protocol?(value)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment