Catch bad URI errors

This commit is contained in:
Thomas Reynolds 2013-01-01 17:40:54 -08:00
parent ed5893ffcd
commit aefe61b18f

View file

@ -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)