only encode if current path is broken

fix/fix-watcher-config
Thomas Reynolds 2016-05-25 11:25:24 -07:00
parent 4ffaa9dde5
commit 51ccfe1143
1 changed files with 7 additions and 3 deletions

View File

@ -158,10 +158,14 @@ module Middleman
# Try to parse URL
begin
uri = URI(::URI.encode(url))
uri = URI(url)
rescue ::URI::InvalidURIError
# Nothing we can do with it, it's not really a URI
return url
begin
uri = URI(::URI.encode(url))
rescue ::URI::InvalidURIError
# Nothing we can do with it, it's not really a URI
return url
end
end
relative = options[:relative]