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

script.html(text) will parse < in the text #1083

Closed
mingelz opened this issue Sep 19, 2017 · 2 comments
Closed

script.html(text) will parse < in the text #1083

mingelz opened this issue Sep 19, 2017 · 2 comments

Comments

@mingelz
Copy link

mingelz commented Sep 19, 2017

cheerio version: 1.0.0-rc.2

var script = $('script').eq(0)

// correct:
script.html('a < b')
script.html() // a < b

// fault: (if remove spaces)
script.html('a<b')
script.html() // a

// correct:
script.replaceWith('<script>a<b</script>')
@fb55
Copy link
Member

fb55 commented Feb 22, 2018

I assume this is some issue with the context not being passed when parsing fragments. cc @inikulin

@5saviahv
Copy link
Contributor

5saviahv commented Jan 1, 2021

I look into

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

3 participants