fix: Replace use of startsWith and endsWith with regex for IE11#1877
fix: Replace use of startsWith and endsWith with regex for IE11#1877UziTech merged 1 commit intomarkedjs:masterfrom
Conversation
|
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/markedjs/markedjs/k5aqw8zes |
UziTech
left a comment
There was a problem hiding this comment.
LGTM. FYI we are planning on releasing v2 soonish and we will be dropping es5 support at that time.
|
@UziTech is there any concern with redos? Would |
|
@UziTech Sounds good. Similarly, we're just tidying up loose ends on docsify v4 (which supports IE11) before moving on to v5 (which will also drop support for IE11). There's no expectation of long-term IE support from marked. We're all ready to put those dark days behind us. 😉 |
|
@calculuschild no there are no quantifiers so it can't be vulnerable but |
|
🎉 This PR is included in version 1.2.7 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Marked version: 1.2.6 (not sure when change was introduced)
Markdown flavor: n/a
Description
startsWithandendsWithbreaks IE11 #1876Expectation
No errors in IE11.
Specifically, marked 1.x is a dependency of https://docsify.js.org which still supports IE11. Goal is to restore IE11 functionality by fixing this issue within marked.
Result
After fixes, no erros in IE11.
What was attempted
Replaced use of
String.startsWith()andString.endsWith()with regular expression tests.Contributor
Verified all tests succeeded
Manually verified changes worked in IE11
Committer
In most cases, this should be a different person than the contributor.