dillon1000/react
Commit
Browse files Allow empty string to be passed to formAction (#26379)
We disallow empty strings for `href` and `src` since they're common mistakes that end up loading the current page as a preload, image or link. We also disallow it for `action`. You have to pass `null` which is the same. However, for `formAction` passing `null` is not the same as passing empty string. Passing empty string overrides the form's action to be the current page even if the form's action was set to something else. There's no easy way to express the same thing `#` show up in the user visible URLs and `?` clears the search params. Since this is also not a common mistake, we can just allow this.
Changed paths3 files
First-parent comparisonpackages/react-dom-bindings/src/shared/DOMProperty.js ModifiedM packages/react-dom/src/__tests__/ReactDOMComponent-test.js ModifiedM packages/shared/ReactFeatureFlags.js ModifiedPatch
Files changed
Rendering syntax-highlighted changes…