Skip to content

dangerouslySetInnerHTML not working in IE #11271

@wladyslawczyzewski

Description

@wladyslawczyzewski

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions