how to encode spaces in get params

Hi-

Easy question, just don't know where to look-

How do I encode an :id that has a space in it:

#tag.tag = "Joe Buck"

<% = link_to tag.tag, {:action => stories_by_tag, :id => tag.tag} %>

this throws an error b/c there is a space in the id. Is there a
function that automatically encodes this? The h function doesn't do
it.

Thanks,
Dino

<% = link_to tag.tag, {:action => stories_by_tag, :id => tag.tag} %>

this throws an error b/c there is a space in the id. Is there a
function that automatically encodes this? The h function doesn't do
it.

Thanks,
Dino

tag.tag.gsub(' ', '%20') ???