-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
fix: Replace use of startsWith and endsWith with regex for IE11 #1877
Conversation
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/markedjs/markedjs/k5aqw8zes |
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.
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
startsWith
andendsWith
breaks 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.