Skip to content

Commit

Permalink
Fix more url_for sanitation
Browse files Browse the repository at this point in the history
  • Loading branch information
nanaya committed Aug 15, 2016
1 parent b95aa94 commit 793a6a7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions app/helpers/application_helper.rb
Expand Up @@ -128,13 +128,13 @@ def navigation_links(post)
posts = post

unless posts.previous_page.nil?
html << tag("link", :href => url_for(params.merge(:page => 1)), :rel => "first", :title => "First Page")
html << tag("link", :href => url_for(params.merge(:page => posts.previous_page)), :rel => "prev", :title => "Previous Page")
html << tag("link", :href => url_for(:page => 1), :rel => "first", :title => "First Page")
html << tag("link", :href => url_for(:page => posts.previous_page), :rel => "prev", :title => "Previous Page")
end

unless posts.next_page.nil?
html << tag("link", :href => url_for(params.merge(:page => posts.next_page)), :rel => "next", :title => "Next Page")
html << tag("link", :href => url_for(params.merge(:page => posts.total_pages)), :rel => "last", :title => "Last Page")
html << tag("link", :href => url_for(:page => posts.next_page), :rel => "next", :title => "Next Page")
html << tag("link", :href => url_for(:page => posts.total_pages), :rel => "last", :title => "Last Page")
end
end

Expand Down

0 comments on commit 793a6a7

Please sign in to comment.