From aefe61b18fee2290006fd08236e973c581fe2b86 Mon Sep 17 00:00:00 2001 From: Thomas Reynolds Date: Tue, 1 Jan 2013 17:40:54 -0800 Subject: [PATCH] Catch bad URI errors --- .../lib/middleman-more/core_extensions/default_helpers.rb | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/middleman-more/lib/middleman-more/core_extensions/default_helpers.rb b/middleman-more/lib/middleman-more/core_extensions/default_helpers.rb index 1b2390f6..c2028407 100644 --- a/middleman-more/lib/middleman-more/core_extensions/default_helpers.rb +++ b/middleman-more/lib/middleman-more/core_extensions/default_helpers.rb @@ -136,8 +136,11 @@ module Middleman # Handle relative urls current_source_dir = Pathname('/' + current_resource.path).dirname - uri = URI(url) - url_path = uri.path + begin + uri = URI(url) + url_path = uri.path + rescue + end if url_path path = Pathname(url_path)