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

.text() ignores script and style tags #1018

Merged
merged 2 commits into from May 7, 2017
Merged

.text() ignores script and style tags #1018

merged 2 commits into from May 7, 2017

Conversation

ghost
Copy link

@ghost ghost commented May 5, 2017

[ First time pull :) ]

text function will ignore script and style tags

Should solve this problem: #986

@coveralls
Copy link

coveralls commented May 5, 2017

Coverage Status

Coverage remained the same at 98.95% when pulling 4aeae2a on Dreamiko:master into 18d41e3 on cheeriojs:master.

@coveralls
Copy link

coveralls commented May 5, 2017

Coverage Status

Coverage remained the same at 98.95% when pulling 2dd9e3f on Dreamiko:master into 18d41e3 on cheeriojs:master.

2 similar comments
@coveralls
Copy link

coveralls commented May 5, 2017

Coverage Status

Coverage remained the same at 98.95% when pulling 2dd9e3f on Dreamiko:master into 18d41e3 on cheeriojs:master.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 98.95% when pulling 2dd9e3f on Dreamiko:master into 18d41e3 on cheeriojs:master.

@ghost ghost changed the title text function ignores script and style tags .text() ignores script and style tags May 5, 2017
@coveralls
Copy link

coveralls commented May 6, 2017

Coverage Status

Coverage remained the same at 98.95% when pulling 71ec6bb on Dreamiko:master into 18d41e3 on cheeriojs:master.

1 similar comment
@coveralls
Copy link

Coverage Status

Coverage remained the same at 98.95% when pulling 71ec6bb on Dreamiko:master into 18d41e3 on cheeriojs:master.

@fb55 fb55 merged commit 4afae9a into cheeriojs:master May 7, 2017
@fb55
Copy link
Member

fb55 commented May 7, 2017

Definitely a needed change, thanks @Dreamiko!

@jimmy-robert
Copy link

Just updated cheerio to 1.0.0-rc.1, this change broke one of my apps. Fyi, jQuery does return text inside script tags.

fb55 added a commit that referenced this pull request Apr 30, 2022
Reverts #1018
Fixes #1050

To keep the current behaviour, you can use `.prop('innerText')` (added in #2214).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants