Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

channel uniquename with no safe HTML characters #409

Closed
enricop89 opened this issue Jan 22, 2019 · 2 comments
Closed

channel uniquename with no safe HTML characters #409

enricop89 opened this issue Jan 22, 2019 · 2 comments
Labels
code-generation issue deals with generated code difficulty: easy fix is easy in difficulty status: help wanted requesting help from the community type: bug bug in the library type: community enhancement feature request not on Twilio's roadmap

Comments

@enricop89
Copy link

enricop89 commented Jan 22, 2019

Version: 3.27.1

Code Snippet

const client = new twilio.Twilio(config.twilio.chat.apikey_sid, config.twilio.chat.apikey_secret,
        { accountSid: config.twilio.accountId });
const uniqueName = "ciao#hola"
client.chat.services(result.twilio_service_id).channels(uniqueName)

Exception/Log

status: 404,
 message: 'The requested resource /Services/ISXXXXXXXXXXX/Channels/ciao was not found',
 code: 20404,

Steps to Reproduce

  1. Use the retrieve channel api
  2. Use uniqueName with no safe HTML characters (such as #)

The function is ignoring the characters after '#' because in HTML the # character has a specific meaning. In order to fix this, you must use the encodeURIComponent function:

client.chat.services(result.twilio_service_id).channels(encodeURIComponent(uniqueName))

@childish-sambino childish-sambino added code-generation issue deals with generated code status: help wanted requesting help from the community type: bug bug in the library type: community enhancement feature request not on Twilio's roadmap labels Sep 17, 2019
@childish-sambino
Copy link
Contributor

This issue has been added to our internal backlog to be prioritized. Pull requests and +1s on the issue summary will help it move up the backlog.

@thinkingserious
Copy link
Contributor

Since there has been no activity on this issue since March 1, 2020, we are closing this issue. Please feel free to reopen or create a new issue if you still require assistance. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code-generation issue deals with generated code difficulty: easy fix is easy in difficulty status: help wanted requesting help from the community type: bug bug in the library type: community enhancement feature request not on Twilio's roadmap
Projects
None yet
Development

No branches or pull requests

3 participants