Link_to problem with '.' in :id parameter (must be escaped!)

Hi,

I have this very normal link_to call:

<%= link_to name, tag_path(name) %>

The ‘name’ can be something like “ASP.NET”. That results in a URL like
http://localhost:3000/tag/ASP.NET

The Problem: I get a “no route” for this URL. I have a route
map.tag ‘/tag/:id’, :controller => ‘items’, :action => ‘tag’

Everything would be fine IF I could just escape the dot to “%2E”, so
that the URL is something like
http://localhost:3000/tag/ASP.NET

PROBLEM: link_to doesnt’t do it, and when I do it myself the “%” is
escaped, so that it looks like
http://localhost:3000/tag/ASP%252EENET

Any advice?

TIA,
Michael

Well, I solved it with this line:

<%= link_to name, ‘/tag/’+name.gsub(’.’,’%2E’), :class => css_class %>