Merge pull request #5297 from quadrupleslap/master

Mangle __html in prop validation.
(cherry picked from commit 517872817f)
This commit is contained in:
Paul O’Shannessy
2015-10-28 12:42:15 -07:00
parent 090c2dd833
commit 12cafa7e00
@@ -52,6 +52,7 @@ var registrationNameModules = ReactBrowserEventEmitter.registrationNameModules;
var CONTENT_TYPES = {'string': true, 'number': true};
var STYLE = keyOf({style: null});
var HTML = keyOf({__html: null});
var ELEMENT_NODE_TYPE = 1;
@@ -257,7 +258,7 @@ function assertValidProps(component, props) {
);
invariant(
typeof props.dangerouslySetInnerHTML === 'object' &&
'__html' in props.dangerouslySetInnerHTML,
HTML in props.dangerouslySetInnerHTML,
'`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. ' +
'Please visit https://fb.me/react-invariant-dangerously-set-inner-html ' +
'for more information.'