From 321db4aa2edf46b8cf54c99bf3b97b48b7099dcf Mon Sep 17 00:00:00 2001 From: brainopia Date: Mon, 23 Feb 2015 19:51:30 +0300 Subject: [PATCH] Change filter on /rails/info/routes to use an actual path regexp from rails Change filter on /rails/info/routes to use an actual path regexp from rails and not approximate javascript version. Oniguruma supports much more extensive list of features than javascript regexp engine. Fixes #18402. --- actionpack/CHANGELOG.md | 8 ++ .../templates/routes/_route.html.erb | 8 +- .../templates/routes/_table.html.erb | 122 +++++++++--------- .../lib/action_dispatch/routing/inspector.rb | 26 +--- .../test/dispatch/routing/inspector_test.rb | 8 -- railties/lib/rails/info_controller.rb | 25 +++- railties/test/rails_info_controller_test.rb | 25 ++++ 7 files changed, 123 insertions(+), 99 deletions(-) diff --git a/actionpack/CHANGELOG.md b/actionpack/CHANGELOG.md index 8f36af94b4e89..7659c35eae06f 100644 --- a/actionpack/CHANGELOG.md +++ b/actionpack/CHANGELOG.md @@ -4,6 +4,14 @@ *David Ilizarov* +* Change filter on /rails/info/routes to use an actual path regexp from rails + and not approximate javascript version. Oniguruma supports much more + extensive list of features than javascript regexp engine. + + Fixes #18402. + + *Ravil Bayramgalin* + * Non-string authenticity tokens do not raise NoMethodError when decoding the masked token. diff --git a/actionpack/lib/action_dispatch/middleware/templates/routes/_route.html.erb b/actionpack/lib/action_dispatch/middleware/templates/routes/_route.html.erb index 24e44f31acf9e..6e995c85c16f5 100644 --- a/actionpack/lib/action_dispatch/middleware/templates/routes/_route.html.erb +++ b/actionpack/lib/action_dispatch/middleware/templates/routes/_route.html.erb @@ -4,13 +4,13 @@ <%= route[:name] %>_path <% end %> - + <%= route[:verb] %> - + <%= route[:path] %> - - <%= route[:reqs] %> + + <%=simple_format route[:reqs] %> diff --git a/actionpack/lib/action_dispatch/middleware/templates/routes/_table.html.erb b/actionpack/lib/action_dispatch/middleware/templates/routes/_table.html.erb index 5cee0b59327ff..429ea7057c3cd 100644 --- a/actionpack/lib/action_dispatch/middleware/templates/routes/_table.html.erb +++ b/actionpack/lib/action_dispatch/middleware/templates/routes/_table.html.erb @@ -81,92 +81,87 @@