Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dangerouslySetInnerHTML not working in IE #11271

Closed
wladyslawczyzewski opened this issue Oct 18, 2017 · 3 comments
Closed

dangerouslySetInnerHTML not working in IE #11271

wladyslawczyzewski opened this issue Oct 18, 2017 · 3 comments

Comments

@wladyslawczyzewski
Copy link

Hello,

Today I have spotted the bug(?) in IE10/IE11: while setting the inner HTML on any element (<p>, <div>, <span>) using dangerouslySetInnerHTML property the browser will raise an error Argument not optional.

I use this with SSR, but the actual HTML received from the server is good, so probably there's a problem with ReactDOM.hydrate func.

Some code:

<p dangerouslySetInnerHTML={{ __html: subTitle }} />

where label is some string that contains HTML.

image

@wladyslawczyzewski wladyslawczyzewski changed the title dangerouslySetInnerHTML not workin in IE dangerouslySetInnerHTML not working in IE Oct 18, 2017
@nhunzaker
Copy link
Contributor

Hey! This was fixed in #10921 and is a known issue. A fix should be out in the next release.

However thank you for the great write up!

@gaearon
Copy link
Collaborator

gaearon commented Nov 3, 2017

React 16.1.0-beta has been released. Please update react, react-dom, and react-test-renderer (if you use it) to this version and let us know if it solved the issue! We’d appreciate if you could test before Monday when we plan to get 16.1.0 out.

@wladyslawczyzewski
Copy link
Author

wladyslawczyzewski commented Nov 3, 2017

@gaearon Hi Dan, everything is working now, thank you!

vbrown608 added a commit to EFForg/sec that referenced this issue Apr 20, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants