Catch bad URI errors
This commit is contained in:
parent
ed5893ffcd
commit
aefe61b18f
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue