Twilio Webchat React App is an application that demonstrates a website chat widget built with Twilio's Conversations JS SDK, Twilio Paste Design library and Create React App.
MIT License
64
stars
71
forks
source link
Add validations to the pre-engagement form, and escape unwanted characters from user input #41
Created custom hook to validate and blacklist unwanted characters so that, scripts or eval functions or console logs cannot be added via user inputs, either from the pre-engagement form or from the chat user input.
Made use of validator.js library to blacklist and escape unwanted characters.
Added HTML based input validation to the "Full Name" form field in the pre-engagement form.
Added unit tests for the useSanitizer custom hook.
Added @testing-library/react-hooks to the dev dependencies for writing unit tests of custom hook.
Contributing to Twilio
All third-party contributors acknowledge that any contributions they provide will be made under the same open-source license that the open-source project is provided under.
[x] I acknowledge that all my contributions will be made under the project's license.
The Pull Request consists of following changes:
useSanitizer
custom hook.@testing-library/react-hooks
to the dev dependencies for writing unit tests of custom hook.Contributing to Twilio