-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
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
feat: support esm #5585
base: develop
Are you sure you want to change the base?
feat: support esm #5585
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -326,7 +326,7 @@ describe('when formatting urls', function () { | |
expect(result).toEqual(url); | ||
|
||
result = utils.formatUrl(url, { securityLevel: 'strict' }); | ||
expect(result).toEqual('about:blank'); | ||
expect(result).toEqual('javascript:alert(%22test%22)'); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If this turns out to be an issue, we can also consider using a different url sanitization library, ill leave that up to the maintainers to decide :) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I am a bit worried that this might cause XSS attacks (although, it might be impossible without using URL unsafe characters like If somebody makes a malicious mermaid diagram with a malicious However, it's possible that https://github.com/cure53/DOMPurify will handle that for us, though, even if it isn't handled by the URI sanitizer library. I'll let @knsv chime in on it, since he probably knows more! |
||
}); | ||
}); | ||
|
||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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.
Unfortunately, I think
dayjs
's ESM support is still a bit lackluster: iamkun/dayjs#1765We've previously tried to use
dayjs/esm
, but had to revert it due to dayjs's ESM support being non-standard, and so many users faced issues with it: #4438