diff --git a/app/lib/helpscout/api.rb b/app/lib/helpscout/api.rb index 127002854..c0538c7a9 100644 --- a/app/lib/helpscout/api.rb +++ b/app/lib/helpscout/api.rb @@ -43,7 +43,7 @@ class Helpscout::API end def add_phone_number(email, phone) - query = URI.encode("(email:#{email})") + query = CGI.escape("(email:#{email})") response = call_api(:get, "#{CUSTOMERS}?mailbox=#{user_support_mailbox_id}&query=#{query}") if response.success? body = parse_response_body(response)