mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
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.
This commit is contained in:
@@ -664,6 +664,8 @@ src/renderers/dom/shared/__tests__/ReactDOMComponent-test.js
|
||||
* should properly escape text content and attributes values
|
||||
* unmounts children before unsetting DOM node info
|
||||
* should warn about the `onScroll` issue when unsupported (IE8)
|
||||
* should throw when an invalid tag name is used server-side
|
||||
* should throw when an attack vector is used server-side
|
||||
* should throw when an invalid tag name is used
|
||||
* should throw when an attack vector is used
|
||||
* should warn about props that are no longer supported
|
||||
|
||||
Reference in New Issue
Block a user