diff --git a/lib/gollum/app.rb b/lib/gollum/app.rb index 0896a79f..2d2300ba 100644 --- a/lib/gollum/app.rb +++ b/lib/gollum/app.rb @@ -348,7 +348,7 @@ module Precious wiki.write_page(name, format, params[:content], commit_message, path) page_dir = settings.wiki_options[:page_file_dir].to_s - redirect to("/#{clean_url(::File.join(page_dir, path, encodeURIComponent(name)))}") + redirect to("/#{clean_url(::File.join(encodeURIComponent(page_dir), encodeURIComponent(path), encodeURIComponent(name)))}") rescue Gollum::DuplicatePageError => e @message = "Duplicate page: #{e.message}" mustache :error