From d6be09e0f0dec4e8112b06ddf9972b17e300693d Mon Sep 17 00:00:00 2001 From: Jacques Distler Date: Tue, 25 May 2010 12:59:35 -0500 Subject: [PATCH] Fix some Helper Methods It seems that (advertising to the contrary) Rails's XSS Protection is enabled, by default in 2.3.8. So needed to fix some helper methods. --- app/helpers/wiki_helper.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/helpers/wiki_helper.rb b/app/helpers/wiki_helper.rb index cd846f1f..2f2f9ea4 100644 --- a/app/helpers/wiki_helper.rb +++ b/app/helpers/wiki_helper.rb @@ -44,11 +44,11 @@ module WikiHelper link_to('Forward in time', {:web => @web.address, :action => 'revision', :id => @page.name, :rev => @revision_number + 1}, {:class => 'navlink', :accesskey => 'F', :id => 'to_next_revision', :rel => 'nofollow'}) + - " (#{@revision.page.revisions.size - @revision_number} more) " + " (#{@revision.page.revisions.size - @revision_number} more) ".html_safe else link_to('Forward in time', {:web => @web.address, :action => 'show', :id => @page.name}, {:class => 'navlink', :accesskey => 'F', :id => 'to_next_revision', :rel => 'nofollow'}) + - " (to current)" + " (to current)".html_safe end end @@ -56,7 +56,7 @@ module WikiHelper link_to('Back in time', {:web => @web.address, :action => 'revision', :id => @page.name, :rev => @revision_number - 1}, {:class => 'navlink', :id => 'to_previous_revision', :rel => 'nofollow'}) + - " (#{@revision_number - 1} more)" + " (#{@revision_number - 1} more)".html_safe end def back_for_page @@ -64,7 +64,7 @@ module WikiHelper {:web => @web.address, :action => 'revision', :id => @page.name, :rev => @page.revisions.size - 1}, {:class => 'navlink', :accesskey => 'B', :id => 'to_previous_revision', :rel => 'nofollow'}) + - " (#{@page.revisions.size - 1} #{@page.revisions.size - 1 == 1 ? 'revision' : 'revisions'})" + " (#{@page.revisions.size - 1} #{@page.revisions.size - 1 == 1 ? 'revision' : 'revisions'})".html_safe end def current_revision