Merge pull request #6723 from betagouv/fix-uri-encode

This commit is contained in:
Pierre de La Morinerie 2021-12-07 15:29:42 +01:00 committed by GitHub
commit 8778b24110
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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)