-
Notifications
You must be signed in to change notification settings - Fork 618
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
feat: Introduce allowHTML option to allow people to disable injecting HTML into choices. #984
Conversation
Awesome! Thanks for taking this up. There are a few test and linting errors that need to be resolved. Can you also add Cypress tests for the three states of |
Should be done 👍Let me know if there are any other changes you would like to be done. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Almost there, still a couple of linting issues. It also looks like we have an issue with custom templates. You can see in the demo page that the custom template example is no longer rendering correctly (there's a unit test failure that should point you in the right direction too).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is excellent, one minor nitpick. Also, the callbackOnCreateTemplates
advanced example in the README needs to be updated too. Then we are good to merge.
All done! 👍 |
Excellent, thanks for this! I made some small changes to the wording around |
Thanks for merging this, is there any chance this will be included in a release soon? Also, while I'm here I have a question regarding the typings because Im not able to import choices.js with typings through Seems like the typings file package.json points to isn't shipped with the module on npm so I can't make it work for me in a TS vue project. |
I'd expect a release in the next week or two. There's at least one more breaking change I'd like to get merged first. Thanks for flagging the types issue, looks like this was missed when the project was converted to TypeScript. It has been fixed on |
Just had another go with the new version with the supposed typings fix - still no luck on my end. Judging off of this diff, the npm module should ship with a public/types folder, which it doesn't seem to do. |
Are you installing from the master branch?
There won't be a new version pushed to npm until the next release. |
Yes, that's the exact command I ran to install it (I also uninstalled the release version beforehand)
This is the line in my package.json, and the contents of the module are the same as above still. |
I've created a PR which fixes this issue: #986 |
Description
This is a continuation of #968 to address an XSS vulnerability when creating labels for choices.
Screenshots (if appropriate)
Choices executing JavaScript functions (
alert()
) defined in a label string.Types of changes
Checklist