Extract path on edit. Fix #410.

This commit is contained in:
bootstraponline
2012-07-03 10:53:18 -06:00
parent 1511baf12d
commit 3f45c76f48
+1 -1
View File
@@ -106,7 +106,7 @@ module Precious
end
post '/edit/*' do
path = sanitize_empty_params(params[:path])
path = extract_path(sanitize_empty_params(params[:path]))
wiki_options = settings.wiki_options.merge({ :page_file_dir => path })
wiki = Gollum::Wiki.new(settings.gollum_path, wiki_options)
page = wiki.page(CGI.unescape(params[:page]))