Open bf4 opened 1 year ago
Same issue as https://github.com/twilio/twilio-ruby/issues/406
I see from v1 https://github.com/twilio/twilio-ruby/blob/6.0.2/lib/twilio-ruby/rest/lookups/v1/phone_number.rb#L53 to v2 the escaping was removed.
- @uri = "/PhoneNumbers/#{CGI.escape(@solution[:phone_number]).gsub("+", "%20")}" + @uri = "/PhoneNumbers/#{@solution[:phone_number]}"
use URI::DEFAULT_PARSER.escape just like Rails does
URI::DEFAULT_PARSER.escape
@uri = "/PhoneNumbers/#{URI::DEFAULT_PARSER.escape(@solution[:phone_number])}"
see https://github.com/twilio/twilio-ruby/issues/406
Hi @bf4,
Thanks for the heads up!
This issue has been added to our internal backlog to be prioritised. Pull requests and +1s on the issue summary will help it move up the backlog.
With best regards,
Athira
Issue Summary
Same issue as https://github.com/twilio/twilio-ruby/issues/406
I see from v1 https://github.com/twilio/twilio-ruby/blob/6.0.2/lib/twilio-ruby/rest/lookups/v1/phone_number.rb#L53 to v2 the escaping was removed.
Proposal
use
URI::DEFAULT_PARSER.escape
just like Rails doesSteps to Reproduce
see https://github.com/twilio/twilio-ruby/issues/406
Code Snippet
see https://github.com/twilio/twilio-ruby/issues/406
Exception/Log
see https://github.com/twilio/twilio-ruby/issues/406
Technical details: