Skip to content
Browse files

clean up encoding inconsistencies

  • Loading branch information...
1 parent 6f8e15b commit ba8862cbfaf33ed029a42448a554ca5af529ab52 @earnold earnold committed with alno May 6, 2011
View
2 app/views/base_wiki_pages/_wiki_page_actions.html.erb
@@ -1,5 +1,5 @@
<ul class="wiki_page_actions">
<%= content_tag('li', link_to( wt( 'History' ), wiki_page_history_path(@page) )) if history_allowed? %>
<%= content_tag('li', link_to( wt( 'Edit' ), wiki_page_edit_path(@page) )) if edit_allowed? %>
- <%= content_tag('li', link_to( wt( 'Destroy' ), wiki_page_path(@page), :method => :delete, :confirm => wt( "Destroyed page cann't be restored. Are you ready for it?" ) )) if destroy_allowed? %>
+ <%= content_tag('li', link_to( wt( 'Destroy' ), wiki_page_path(@page), :method => :delete, :confirm => wt( "Destroyed page can't be restored. Are you ready for it?" ) )) if destroy_allowed? %>
</ul>
View
2 lib/irwi/extensions/models/wiki_page.rb
@@ -3,7 +3,7 @@ module Irwi::Extensions::Models::WikiPage
module ClassMethods
def find_by_path_or_new( path )
- self.find_by_path( path ) || self.new( :path => path, :title => path )
+ self.find_by_path( path ) || self.new( :path => path, :title => CGI::unescape(path) )
end
end
View
2 lib/irwi/helpers/wiki_pages_helper.rb
@@ -68,7 +68,7 @@ def wiki_link( title )
if page = Irwi.config.page_class.find_by_title( title )
url_for( :controller => Irwi.config.controller_name, :action => :show, :path => page.path )
else
- url_for( :controller => Irwi.config.controller_name, :action => :show, :path => title )
+ url_for( :controller => Irwi.config.controller_name, :action => :show, :path => CGI::escape(title) )
end
end

0 comments on commit ba8862c

Please sign in to comment.
Something went wrong with that request. Please try again.