fix cgi escape

This commit is contained in:
albert
2013-02-17 02:37:26 -05:00
parent 0d8447fa82
commit 4b60d648ee

View File

@@ -225,12 +225,12 @@ Danbooru::Application.routes.draw do
match "/post/index.json", :controller => "legacy", :action => "posts", :format => "json"
match "/post/create.xml", :controller => "legacy", :action => "create_post"
match "/post/piclens", :controller => "legacy", :action => "unavailable"
match "/post/index" => redirect {|params, req| "/posts?tags=#{u(req.params[:tags])}&page=#{req.params[:page]}"}
match "/post" => redirect {|params, req| "/posts?tags=#{u(req.params[:tags])}&page=#{req.params[:page]}"}
match "/post/index" => redirect {|params, req| "/posts?tags=#{CGI::escape(req.params[:tags])}&page=#{req.params[:page]}"}
match "/post" => redirect {|params, req| "/posts?tags=#{CGI::escape(req.params[:tags])}&page=#{req.params[:page]}"}
match "/post/upload" => redirect("/uploads/new")
match "/post/moderate" => redirect("/moderator/post/queue")
match "/post/atom" => redirect {|params, req| "/posts.atom?tags=#{u(req.params[:tags])}"}
match "/post/atom.feed" => redirect {|params, req| "/posts.atom?tags=#{u(req.params[:tags])}"}
match "/post/atom" => redirect {|params, req| "/posts.atom?tags=#{CGI::escape(req.params[:tags])}"}
match "/post/atom.feed" => redirect {|params, req| "/posts.atom?tags=#{CGI::escape(req.params[:tags])}"}
match "/post/popular_by_day" => redirect("/explore/posts/popular")
match "/post/popular_by_week" => redirect("/explore/posts/popular")
match "/post/popular_by_month" => redirect("/explore/posts/popular")
@@ -256,7 +256,7 @@ Danbooru::Application.routes.draw do
match "/wiki" => redirect {|params, req| "/wiki_pages?page=#{req.params[:page]}"}
match "/wiki/index" => redirect {|params, req| "/wiki_pages?page=#{req.params[:page]}"}
match "/wiki/show" => redirect {|params, req| "/wiki_pages?title=#{u(req.params[:title])}"}
match "/wiki/show" => redirect {|params, req| "/wiki_pages?title=#{CGI::escape(req.params[:title])}"}
match "/wiki/recent_changes" => redirect("/wiki_page_versions")
match "/wiki/history/:title" => redirect("/wiki_page_versions?title=%{title}")