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:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user