do not throw exception when parsing a bad URI
This commit is contained in:
parent
c79ab3fc2e
commit
da52ac88b0
|
@ -181,6 +181,7 @@ class CookedPostProcessor
|
||||||
def is_valid_image_uri?(url)
|
def is_valid_image_uri?(url)
|
||||||
uri = URI.parse(url)
|
uri = URI.parse(url)
|
||||||
%w(http https).include? uri.scheme
|
%w(http https).include? uri.scheme
|
||||||
|
rescue URI::InvalidURIError
|
||||||
end
|
end
|
||||||
|
|
||||||
def dirty?
|
def dirty?
|
||||||
|
|
Loading…
Reference in New Issue