JC: fixed bug in retrieving engine name from params[:controller] in search helper, replacing with a regexp which is shorter and easier to understand.