Forum: Rails-core (closed, excessive spam) Bug in Rails Route Globbing

374717e4aceb8b92431f3bd9b5673636?d=identicon&s=25 Chris Roos (Guest)
on 2008-05-08 17:46
(Received via mailing list)
Slashes in the 'globbed' parameters are not escaped.  I've got a
failing test and patch ready to submit (I'll update the thread once
I've got them submitted) but wondered if others could comment on
whether they expect the behaviour I've outlined below?

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>

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>

Cheers,

Chris
374717e4aceb8b92431f3bd9b5673636?d=identicon&s=25 Chris Roos (Guest)
on 2008-05-08 18:06
(Received via mailing list)
Here's the ticket and patch -
http://rails.lighthouseapp.com/projects/8994-ruby-...

I'm afraid the patch is just the output of svn diff as I'm not on the
git ship just yet.  Is it hard to convert the output of svn diff
(diff) to something that git understands?

Chris
This topic is locked and can not be replied to.