Catch bad URI errors
This commit is contained in:
parent
ed5893ffcd
commit
aefe61b18f
|
@ -136,8 +136,11 @@ module Middleman
|
||||||
# Handle relative urls
|
# Handle relative urls
|
||||||
current_source_dir = Pathname('/' + current_resource.path).dirname
|
current_source_dir = Pathname('/' + current_resource.path).dirname
|
||||||
|
|
||||||
uri = URI(url)
|
begin
|
||||||
url_path = uri.path
|
uri = URI(url)
|
||||||
|
url_path = uri.path
|
||||||
|
rescue
|
||||||
|
end
|
||||||
|
|
||||||
if url_path
|
if url_path
|
||||||
path = Pathname(url_path)
|
path = Pathname(url_path)
|
||||||
|
|
Loading…
Reference in a new issue