1
0
Fork 0
mirror of https://github.com/middleman/middleman.git synced 2022-11-09 12:20:27 -05:00

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
begin
uri = URI(url)
url_path = uri.path
rescue
end
if url_path
path = Pathname(url_path)