-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
[0.10] Ban javascript URLs in @lexical/link #4342
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
size-limit report 📦
|
if (!SUPPORTED_URL_PROTOCOLS.has(parsedUrl.protocol)) { | ||
return 'about:blank'; | ||
} |
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.
What's your opinion on the file:
protocol? Is it bad to support it? I understand the concerns around javascript:
but not sure how strict we want to be
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.
I don't really have an opinion, tbh. This copies Quill, which seems like a sensible place to start since people presumably have been living with that for a while without any serious problems. My thought is to start with this and then expand. The only issue I have is that there's not really a good way to notify a user when this happens. Like, theoretically the URL could pass the user-supplied validation at the plugin level, and then fail here, which is not ideal, but probably pretty uncommon.
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.
👍
More targeted approach to #4329