Permalink
Browse files

clear up where path escaping happens

  • Loading branch information...
1 parent 1a23348 commit ebf8d5d7342c1d1829b8b4b8792852f44d0da1b1 @earnold earnold committed with alno May 6, 2011
Showing with 2 additions and 2 deletions.
  1. +1 −1 lib/irwi/extensions/controllers/wiki_pages.rb
  2. +1 −1 lib/irwi/helpers/wiki_pages_helper.rb
@@ -116,7 +116,7 @@ def setup_current_user
# Initialize @page instance variable
def setup_page
- @page = page_class.find_by_path_or_new( CGI::escape(params[:path]) || '' ) # Find existing page by path or create new
+ @page = page_class.find_by_path_or_new( params[:path] || '' ) # Find existing page by path or create new
end
# Method, which called when user tries to visit
@@ -8,7 +8,7 @@ def wiki_page_form( config = {}, &block )
form_for( @page, { :as => :page, :url => url_for( :action => :update ), :html=> { :class => 'wiki_form', :method => :post } }.merge!( config ), &block )
end
- def wiki_page_new_path( page = params[:path] )
+ def wiki_page_new_path( page = CGI::escape(params[:path]) )
wiki_page_path( page, :new )
end

0 comments on commit ebf8d5d

Please sign in to comment.