Force the X-Page-Title value to be treated as UTF-8
[rails.git] / config / initializers / routing_redirect.rb
1 require "action_dispatch/routing/redirection"
2
3 #
4 # Fix escaping in routes to use path style escaping
5 #
6 # https://github.com/rails/rails/issues/13110
7 #
8 module ActionDispatch
9   module Routing
10     class PathRedirect < Redirect
11       def escape(params)
12         Hash[params.map{ |k,v| [k, URI.escape(v)] }]
13       end
14     end
15   end
16 end