app/validators/url_validator.rb
# Return true if URL matches URL_REGEX and its decoding is valid UTF-8.
Return true if URL matches URL_REGEX and its decoding is valid UTF-8.
Return true if URL matches URL_REGEX and its decoding is valid UTF - 8 .
def url_acceptable?(value)
    if !URL_REGEX.match?(value)
      false
    else
      unescape_unforced(value).force_encoding('UTF-8').valid_encoding?
    end
  end
def url_acceptable? ( value ) if ! URL_REGEX . match? ( value ) false else unescape_unforced ( value ) . force_encoding ( 'UTF-8' ) . valid_encoding? end end
Return true if URL matches URL_REGEX and its decoding is valid UTF-8.
Return true if URL matches URL_REGEX and its decoding is valid UTF - 8 .
# The unescapes the *entire* URL, but that's okay because we've # already confirmed that the domain name doesn't have "%"
value
<not_specific>