I'm writing a search form for my Rails (2.3.9 but I've checked that this problem exists also on 3.0.3) application. The problem is that Rails is stripping quotation marks from the users input. I would like to give the users possibility to write:
But in my controller for both cases I'm getting only one string:
Processing NewsController#index (for 127.0.0.1 at 2010-11-23 10:23:15) [GET]
Parameters: {"action"=>"index", "controller"=>"news", "search"=>{"category"=>"", "news_agency"=>"", "fullsearch"=>"ruby on rails", "order"=>""}}
Is there any option to skip this stripping the quotation marks?
Remark: When user adds spaces to the both sides for the search string for example: ' "ruby on rails" ' the string will get correctly sent:
Processing NewsController#index (for 127.0.0.1 at 2010-11-23 10:23:15) [GET]
Parameters: {"action"=>"index", "controller"=>"news", "search"=>{"category"=>"", "news_agency"=>"", "fullsearch"=>" \"ruby on rails\" ", "order"=>""}}
Seems to be a Rack 1.1 bug: http://thewebfellas.com/blog/2010/7/15/rails-2-3-8-rack-1-1-and-the-curious-case-of-the-missing-quotes