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

fix: Trim whitespace from CSS ownerNode innerText #406

Merged
merged 2 commits into from
Oct 29, 2019

Conversation

Robdel12
Copy link
Contributor

What is this?

If the style element has innerText that's just line returns, we will incorrectly assume that it has valid CSS content.

This PR will strip whitespace from the ownerNodes innerText.

Otherwise, we might incorrectly assume this style element has valid CSS
content.

In the future we might want to regex check the content?
@Robdel12 Robdel12 requested a review from wwilsman October 29, 2019 16:44
@Robdel12 Robdel12 merged commit 5a4f830 into master Oct 29, 2019
@delete-merged-branch delete-merged-branch bot deleted the rd/fix-cssom-white-space branch October 29, 2019 17:12
djones pushed a commit that referenced this pull request Oct 29, 2019
## [0.19.4](v0.19.3...v0.19.4) (2019-10-29)

### Bug Fixes

* Trim whitespace from CSS ownerNode innerText ([#406](#406)) ([5a4f830](5a4f830))
This was referenced Nov 5, 2019
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