Open jwestbrook opened 3 years ago
:+1:
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() { return this.replace(/<(?=(\w+))\1(\s+("[^"]"|'[^']'|[^>])+)?>|<\/(?=(\w+))\1>/gi, ''); }
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 prototype.js
:
String.prototype.stripTags = function () {
return this.replace(/<\w+(\s+("[^"]*"|'[^']*'|[^>'"])+)?\s*("[^">]*|'[^'>])?(\/)?>|<\/\w+>/gi, '');
};
Per conversation, here is the Pull Request for the advisory. Attempt 2