Fix names created with the 'New' button.

Previously, a page created with the 'New' button would get all of its
spaces turned into the + symbol when submitted, which Gollum would then
convert into "-plus-" in the title. So, for example, a request to create
a page called "Test page" would instead get "test plus page".

This change changes + to - in the parameter received by /create/.
This commit is contained in:
Rob Speer
2012-08-22 14:09:51 -04:00
parent 7c825e877c
commit 2b4848566c
+1 -1
View File
@@ -172,7 +172,7 @@ module Precious
end
get '/create/*' do
wikip = wiki_page(params[:splat].first)
wikip = wiki_page(params[:splat].first.gsub('+', '-'))
@name = wikip.name.to_url
@path = wikip.path