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 forhrefproperties on various tags. This PR also adds that sanitization for<object>tags as well that Firefox otherwise executes.