-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Wrong behavior with multiple escaped characters #10
Comments
Why are you feeding already escaped input to cssesc? What output are you expecting? Please provide a reproduction case in JS. |
const cssesc = require('cssesc');
console.log(cssesc('😀 😀')); Output: \1F600 \1F600 Two space between, but in source one. |
Your input has one space already: const cssesc = require('cssesc');
cssesc('\u{1F600} \u{1F600}'); The additional space following The input from your original post: .class { content: "\F10C \F10D" } …decodes to |
@mathiasbynens I'm not really sure then who is responsible for the problem, |
And we give some incorrect behavior with escaped characters, example above #10 (comment) |
@mathiasbynens also you example contain two spaces in output const cssesc = require('cssesc');
console.log(cssesc('\u{1F600} \u{1F600}')); \1F600 \1F600 We do not need two spaces right? |
@evilebottnawi Exactly, and the rest of my comment explains why that’s okay. Check out the link I posted for more info. |
@evilebottnawi It seems like there is some kind of bug in one of the projects you mentioned — they shouldn’t escape already-escaped data. Are there open bug tickets I could look at? |
@mathiasbynens I have not seen them, we are preparing to release a stable version |
Input:
Output:
The text was updated successfully, but these errors were encountered: