Bugfix: MIME parser RegExp didn't escape boundary which caused issues

This commit is contained in:
the-djmaze 2024-02-26 17:36:55 +01:00
parent 50569e1854
commit 7bc302c665
2 changed files with 8 additions and 1 deletions

7
dev/prototype.js vendored
View file

@ -44,6 +44,13 @@
return template.content.firstChild;
};
/**
* https://github.com/tc39/proposal-regex-escaping
*/
if (!RegExp.escape){
RegExp.escape = s => String(s).replace(/[\\^$*+?.()|[\]{}]/g, '\\$&');
}
/**
* Every time the function is executed,
* it will delay the execution with the given amount of milliseconds.