Repository navigation
[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.
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.
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.
More targeted approach to #4329