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:
parent
ed5893ffcd
commit
aefe61b18f
1 changed files with 5 additions and 2 deletions
|
@ -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