heroku/databasedotcom — Issue #14: Special Characters Not Being Escaped?
Author: dgbrown
Created: 2011-10-11 19:34:50+00:00
State: open

Hello,

Reporting in with more issues/concerns about the gem. It appears that in text fields, special characters such as single quotes are not being escaped. When selecting salesforce record based on a text-field, providing a value that contains a single quote, the action fails, with a stack trace similar to the following:

--------------------------------------------------------------------------------------------------
mismatched character '' expecting '''

/home/rails/www.infotech.com/shared/bundle/ruby/1.9.1/bundler/gems/databasedotcom-40bf8a1d5d0a/lib/databasedotcom/client.rb:356:in `ensure_expected_response'\n/home/rails/www.infotech.com/shared/bundle/ruby/1.9.1/bundler/gems/databasedotcom-40bf8a1d5d0a/lib/databasedotcom/client.rb:314:in `with_encoded_path_and_checked_response'\n/home/rails/www.infotech.com/shared/bundle/ruby/1.9.1/bundler/gems/databasedotcom-40bf8a1d5d0a/lib/databasedotcom/client.rb:268:in `http_get'\n/home/rails/www.infotech.com/shared/bundle/ruby/1.9.1/bundler/gems/databasedotcom-40bf8a1d5d0a/lib/databasedotcom/client.rb:184:in `query'\n/home/rails/www.infotech.com/shared/bundle/ruby/1.9.1/bundler/gems/databasedotcom-40bf8a1d5d0a/lib/databasedotcom/sobject/sobject.rb:251'
--------------------------------------------------------------------------------------------------

ex. Contact.find_by_email_login_id__c( user.login )
^-- where user.login = o'reily@domain.com

Any insight into this issue would be much appreciated.