Menu

#85 Character escape sequences gets corrupted by the parser.

0.9.25
closed
RBRi
None
5
2018-01-27
2018-01-18
No

For example this selector

.v-ie .base .v-inline-datefield-button:after {
  content: "\200B";
}

turns into this after parsing:

.v-ie .base .v-inline-datefield-button:after {
  content:"​"
}

The resulting character is not printable with the font in this view, but can be printed in the edit mode. It is represented by three bytes 0xE2 0x80 0x8B. I expect however the escaped sequence to be preserved.

Discussion

  • Daniel Estermann

    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -14,4 +14,4 @@
     }
     ~~~
    
    -The resulting character is represented by three bytes `0xE2 0x80 0x8B` but I expect the escaped sequence to be preseved.
    +The resulting character is not printable with the font in this view, but can be printed in the edit mode. It is represented by three bytes `0xE2 0x80 0x8B`. I expect however the escaped sequence to be preseved.
    
     
  • Daniel Estermann

     

    Last edit: Daniel Estermann 2018-01-18
  • Daniel Estermann

    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -14,4 +14,4 @@
     }
     ~~~
    
    -The resulting character is not printable with the font in this view, but can be printed in the edit mode. It is represented by three bytes `0xE2 0x80 0x8B`. I expect however the escaped sequence to be preseved.
    +The resulting character is ​ (it' not printable with the font in the code block). It is represented by three bytes `0xE2 0x80 0x8B`. I expect however the escaped sequence to be preseved.
    
     

    Last edit: Daniel Estermann 2018-01-18
  • Daniel Estermann

    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -14,4 +14,4 @@
     }
     ~~~
    
    -The resulting character is ​ (it' not printable with the font in the code block). It is represented by three bytes `0xE2 0x80 0x8B`. I expect however the escaped sequence to be preseved.
    +The resulting character is not printable with the font in this view, but can be printed in the edit mode. It is represented by three bytes `0xE2 0x80 0x8B`. I expect however the escaped sequence to be preseved.
    
     
  • Daniel Estermann

    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -14,4 +14,4 @@
     }
     ~~~
    
    -The resulting character is not printable with the font in this view, but can be printed in the edit mode. It is represented by three bytes `0xE2 0x80 0x8B`. I expect however the escaped sequence to be preseved.
    +The resulting character is not printable with the font in this view, but can be printed in the edit mode. It is represented by three bytes `0xE2 0x80 0x8B`. I expect however the escaped sequence to be preserved.
    
     
  • RBRi

    RBRi - 2018-01-20

    Have added a new format option ' useSourceStringValues'. Use the latest snapshot build and check if this works for you.

    InputSource source = new InputSource(new StringReader("div:after{content:'css\\200Bparser'}"));
    CSSOMParser parser = new CSSOMParser(new SACParserCSS3());
    CSSStyleSheetImpl sheet = (CSSStyleSheetImpl) parser.parseStyleSheet(source, null, null);
    
    Assert.assertEquals("div:after { content: \"css\u200Bparser\" }", sheet.getCssText());
    
    Assert.assertEquals("div:after { content: \"css\\200Bparser\" }", sheet.getCssText(new CSSFormat().setUseSourceStringValues(true)));
    
     
  • RBRi

    RBRi - 2018-01-20
    • status: open --> pending
    • assigned_to: RBRi
     
  • Daniel Estermann

    I tested it for me and it looks good. When can you make a release?

     
  • RBRi

    RBRi - 2018-01-22

    The plan is to do it this weekend - ok or do you need it earlier?

     
    • Daniel Estermann

      No need to hurry, this weekend is perfect. Thank you in advance!

       
  • RBRi

    RBRi - 2018-01-27
    • status: pending --> closed
     

Anonymous
Anonymous

Add attachments
Cancel