From 321db4aa2edf46b8cf54c99bf3b97b48b7099dcf Mon Sep 17 00:00:00 2001 From: brainopia Date: Mon, 23 Feb 2015 19:51:30 +0300 Subject: 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 ++ .../middleware/templates/routes/_route.html.erb | 8 +- .../middleware/templates/routes/_table.html.erb | 122 ++++++++++----------- .../lib/action_dispatch/routing/inspector.rb | 26 +---- actionpack/test/dispatch/routing/inspector_test.rb | 8 -- 5 files changed, 75 insertions(+), 97 deletions(-) (limited to 'actionpack') diff --git a/actionpack/CHANGELOG.md b/actionpack/CHANGELOG.md index 8f36af94b4..7659c35eae 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 24e44f31ac..6e995c85c1 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 5cee0b5932..429ea7057c 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 @@