From 19dc855551f5d57f3ae558bcc18514fb2a3e5cc0 Mon Sep 17 00:00:00 2001 From: Matt Rogers Date: Mon, 10 Mar 2014 14:35:03 -0400 Subject: [PATCH] Properly strip drive name from clean path when sanitizing path. --- lib/jekyll.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/jekyll.rb b/lib/jekyll.rb index 6c6fafa4..5caea137 100644 --- a/lib/jekyll.rb +++ b/lib/jekyll.rb @@ -111,7 +111,7 @@ module Jekyll def self.sanitized_path(base_directory, questionable_path) clean_path = File.expand_path(questionable_path, fs_root) - clean_path.gsub!(/\/\w\:\//, '/') + clean_path.gsub!(/\w\:\//, '/') unless clean_path.start_with?(base_directory) File.join(base_directory, clean_path) else