FormidableLabs / css-to-radium

Radium migration CLI, converts CSS to Radium-compatible JS objects.
MIT License
79 stars 5 forks source link

UTF8 Character codes aren't escaped properly #15

Open KevinNorth opened 8 years ago

KevinNorth commented 8 years ago

I believe this CSS demonstrates a bug I found:

div:before {
  content: '\0026';
}

css-to-radium transpiles it to:

{
    'div:before': {
        content: '\'\0026\''
    }
}

This is incorrect JS, however, because the \ in \0026 needs to be escaped as well, like so:

{
    'div:before': {
        content: '\'\\0026\''
    }
}