From da52ac88b0bbe2f21360861321990b1f0033ee07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9gis=20Hanol?= Date: Mon, 24 Jun 2013 21:38:00 +0200 Subject: [PATCH] do not throw exception when parsing a bad URI --- lib/cooked_post_processor.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/cooked_post_processor.rb b/lib/cooked_post_processor.rb index 1d4b2836cec..fd3fab9acd9 100644 --- a/lib/cooked_post_processor.rb +++ b/lib/cooked_post_processor.rb @@ -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?