dillon1000/react
Commit
Browse files Only do runtime validation of tag names when createElement is not used
We introduced runtime validation of tag names because we used to generate HTML that was supposed to be inserted into a HTML string which could've been an XSS attack. However, these days we use document.createElement in most cases. That already does its internal validation in the browser which throws. We're now double validating it. Stack still has a path where innerHTML is used and we still need it there. However in Fiber we can remove it completely.
Changed paths4 files
First-parent comparisonscripts/fiber/tests-passing.txt ModifiedM src/renderers/dom/fiber/ReactDOMFiberComponent.js ModifiedM src/renderers/dom/shared/__tests__/ReactDOMComponent-test.js ModifiedM src/renderers/dom/stack/client/ReactDOMComponent.js ModifiedPatch
Files changed
Rendering syntax-highlighted changes…