This project is archived and is in readonly mode.

#144 ✓resolved
Chris Roos

Bug in Rails Route Globbing

Reported by Chris Roos | May 8th, 2008 @ 05:00 PM | in 2.1.1

Slashes in the 'globbed' parameters are not escaped. The patch contains two modified tests, to illustrate the bug, and a fix.

Given this route:

map.connect 'glob/show/*additional', :controller => 'glob', :action => 'show'

And this template:

<p><%= link_to 'test route globbing', :controller => 'glob', :action => 'show', :additional => ['foo/bar', 'baz'] %></p></code>

I'd expect the generated URL to be (note the escaped slash between foo and bar):

<p><a href="/glob/show/foo%2Fbar/baz">test route globbing</a></p>

Instead, the generated URL is:

<p><a href="/glob/show/foo/bar/baz">test route globbing</a></p>

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href=""></a>

Shared Ticket Bins


Referenced by