do not throw exception when parsing a bad URI

This commit is contained in:
Régis Hanol 2013-06-24 21:38:00 +02:00
parent c79ab3fc2e
commit da52ac88b0
1 changed files with 1 additions and 0 deletions

View File

@ -181,6 +181,7 @@ class CookedPostProcessor
def is_valid_image_uri?(url)
uri = URI.parse(url)
%w(http https).include? uri.scheme
rescue URI::InvalidURIError
end
def dirty?