css-to-radium icon indicating copy to clipboard operation
css-to-radium copied to clipboard

UTF8 Character codes aren't escaped properly

Open KevinNorth opened this issue 8 years ago • 0 comments

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\''
    }
}

KevinNorth avatar Oct 07 '16 21:10 KevinNorth