Forums | Admin

Discussion Forums: help

Start New Thread Start New Thread

 

By: yossarian dunbar
RE: Slashes in tag names problem [ reply ]  
2006-08-28 15:16
For the moment, I'll get around this like so:

def purify(tags)
tags.gsub!(/[\/\\]/, '-')
end

and before I tag anything, call:

tags = purify(tags)

By: yossarian dunbar
Slashes in tag names problem [ reply ]  
2006-08-28 14:06
Hi,

So, users being users, some of them are tagging records with tags in the format "foo/bar".

The slash means that doing a find_tagged_with fails due to a routing error.

Is there any magic trick to escape the slash so that this doesn't happen? Does anyone have a regular expression that will strip out all 'bad' characters like this?

I am happy to report that the new 2.0.2 update does deal with characters like `, quotes, ampersands, etc. Thanks for that.