mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
Merge pull request #6469 from keyanzhang/validate-foreignObject-children
Ensure validateDOMNesting catches nested body elements
This commit is contained in:
@@ -83,5 +83,7 @@ describe('ReactContextValidator', function() {
|
||||
expect(isTagStackValid(['table', 'tr'])).toBe(false);
|
||||
expect(isTagStackValid(['div', 'ul', 'li', 'div', 'li'])).toBe(false);
|
||||
expect(isTagStackValid(['div', 'html'])).toBe(false);
|
||||
expect(isTagStackValid(['body', 'body'])).toBe(false);
|
||||
expect(isTagStackValid(['svg', 'foreignObject', 'body', 'p'])).toBe(false);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -208,6 +208,7 @@ if (__DEV__) {
|
||||
case 'rt':
|
||||
return impliedEndTags.indexOf(parentTag) === -1;
|
||||
|
||||
case 'body':
|
||||
case 'caption':
|
||||
case 'col':
|
||||
case 'colgroup':
|
||||
|
||||
Reference in New Issue
Block a user