Turns out that Rails versions 2.3.6 through 2.3.8 have a pretty horrid parameter-parsing bug, and I’m surprised there hasn’t been more hoopla about it.
If you have a textarea form that someone types a quote character into, the value you get back from params[:key] is truncated at the point of the quote.
Monkey patching to the rescue!
I decided to add a new raw_params method to ActiveRecord::Request, rather than fixing the bug and dealing with more potential side-effects, assuming this mess will be fixed in Rails 3. If it isn’t, we should fix ActionController::Base.param_parsers[:url_encoded_form] to return the properly-parsed parameters from the raw_post.
In your rails application, create config/initializers/request.rb, with the following contents:
Mac OS X’s Java Preferences.app has a pane for switching between versions of the JDK, but I just found out from a coworker (thanks, Mike!) that you can make your shell match that preference easily — just add this to your