-
Notifications
You must be signed in to change notification settings - Fork 47.2k
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
sanitize javascript: urls for <object> tags #29808
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
My open question is if we have preferred behavior of |
What does
The goal is to not accidentally load current page URL a second time for no good reason. |
Seems like you have some failing tests too. |
React 19 added sanitization for `javascript:` URLs for `href` properties on various tags. This PR also adds that sanitization for `<object>` tags as well that Firefox otherwise executes.
Tests pass now. Implemented removing the string removal to match general empty string behavior. I couldn't repro the behavior of re-requesting the page either with imgs or object tags, maybe I'm missing something or it doesn't show up in the network panel. Had a repro in this sandbox: https://codesandbox.io/p/sandbox/upbeat-hofstadter-dvmlwv?file=%2Findex.html%3A12%2C1 |
It seems like Chrome (and possibly other browsers?) are no longer trying to render an image with an empty |
sanitize javascript: urls for tags
React 19 added sanitization for
javascript:
URLs forhref
properties on various tags. This PR also adds that sanitization for<object>
tags as well that Firefox otherwise executes.