-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Read from textContent rather than innerHTML during rehydrate #3568
Read from textContent rather than innerHTML during rehydrate #3568
Conversation
I want to say we use |
@probablyup I don't quite remember anymore. We could just retest it. As long as we use |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
@keeganstreet Mind adding a quick changelog entry before I merge? |
5c16c47
to
6509bb7
Compare
6509bb7
to
4b3d1b9
Compare
@probablyup sure, done 👍 Would you like another PR to apply this to the legacy-v5 branch? |
Sure, go ahead. |
…nerHTML during rehydrate) to v5 (styled-components#3591) * Backport styled-components#3568 to v5 * Describe innerHTML to textContent change Co-authored-by: Keegan Street <keegan.street@rea-group.com>
Resolves #3567
Sorry about the lack of tests. I tried adding the following test but it passes even without this change, so it's not particularly useful. I think that
innerHTML
behaves differently in actual browsers compared with the environment where the Jest tests are run (JSDOM?)packages/styled-components/src/sheet/test/Rehydration.test.js