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

Add safe guard to dangerouslySetInnerHTML #91

Merged
merged 1 commit into from
Mar 14, 2016
Merged

Add safe guard to dangerouslySetInnerHTML #91

merged 1 commit into from
Mar 14, 2016

Conversation

steelbrain
Copy link

@developit Any ideas how to add tests for this one? You don't seem to have functional tests and this is a deep down change. Also I am not sure how to repro this manually

Fixes #90

@developit
Copy link
Member

@steelbrain Awesome, will merge. I think it needs to be slightly tweaked so that unsetting it doesn't overwrite newly created children, something like:

else if (name==='dangerouslySetInnerHTML') {
    if (value && value.__html) node.innerHTML = value.__html;
}

developit added a commit that referenced this pull request Mar 14, 2016
@developit developit merged commit 22d785a into preactjs:master Mar 14, 2016
@developit
Copy link
Member

Released in 4.3.2

@steelbrain steelbrain deleted the steelbrain/fix-attribute-handling branch March 14, 2016 01:44
marvinhagemeister added a commit that referenced this pull request Mar 2, 2019
 Add more tests for Fragments and array children
marvinhagemeister added a commit that referenced this pull request Mar 15, 2022
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

Successfully merging this pull request may close these issues.

2 participants