-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
.css() splits a property declaration if it contains a semi-colon #1134
Comments
A data-uri scheme is as follow :
So, i figured I could rely on EDIT:
|
PR opened #1135 |
This is also an issue when I have a URL that includes semicolon (;) even when it isn't part of a base64 encoded URL. My clients website is old and includes these as part of the URL which I think i can see is part of an original spec that it is actually a supported, reserved character for the URL such as / and ? are. I'm not sure if this has been superseded by something but this at least indicates to me that it should be supported and there will be use cases outside of the base64 encoding of images. See below for an example of the source, and how it's parsed. It decides to just completely end parsing at the ; character for that CSS rule which breaks it. |
I've had the same problem, and for now I'm using a workaround by replacing |
I am experiencing the same issue. @bruceCzK thank you for the handy workaround. |
I would suggest package cssom it gives very browser like interface. All parsing and serializing is done by package. caveat is if content for parsing has some faulty content it throws. |
Hello !
I am reporting a bug I found.
I am running cheerio
1.0.0-rc.2
I have an unexpected behavior using the
.css()
function.It should go along the way to the closing parenthesis of my
url
statement.What I actually get is that it stops at the semi-colon
;
as if it was the end of my property declaration.Initial settings
Faulty function
Expected output
'url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAC4AAA)'
Given output
'url(data:image/png'
The text was updated successfully, but these errors were encountered: