-
Notifications
You must be signed in to change notification settings - Fork 641
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
Update regex for striptags method to prevent regex dos #349
base: master
Are you sure you want to change the base?
Conversation
👍 |
Heya, is there a test somewhere demonstrating that this works? Thanks. Ideally, this should be added to master/test/unit/tests/string.test.js |
Is there any plan to create a new release including this fix? |
This RegEx does not seem to work i tried in my project MY unit tests are failing since the UI id being created using this are incorrect/changed. Any ideas? |
Try below function stripTags() { |
Can anyone please update on this PR? |
The project is not active and will not be doing further releases. You are encouraged to apply this fix yourself after loading String.prototype.stripTags = function () {
return this.replace(/<\w+(\s+("[^"]*"|'[^']*'|[^>'"])+)?\s*("[^">]*|'[^'>])?(\/)?>|<\/\w+>/gi, '');
}; |
Per conversation, here is the Pull Request for the advisory. Attempt 2