Migrate from GitHub to SourceForge with this tool. Check out all of SourceForge's recent improvements.
Close

#68 unicode-range drops characters

0.9.21
closed
RBRi
None
1
2016-11-22
2016-11-11
No

The parsing for the property unicode-range under @font-face rules drops special characters and as such will not be translated correctly.
The following will result in invalid CSS

        final String css = "@font-face{\n" +
                "    unicode-range: U+0000-00FF, U+4??\n" +
                "    }";
        CSSOMParser cssomParser = new CSSOMParser(new SACParserCSS3());
        CSSStyleSheet cssStyleSheet = cssomParser.parseStyleSheet(new InputSource(new StringReader(css)), null, null);
        CSSRuleList cssRules = cssStyleSheet.getCssRules();
        assertEquals(1,cssRules.getLength());
        assertEquals(css, cssRules.item(0));

The parser strips leading zeroes, which is fine. But it also strips '+','-','?' which leads to unusable css.

Discussion

  • RBRi

    RBRi - 2016-11-11
    • status: open --> pending
    • assigned_to: RBRi
     
    • Anonymous

      Anonymous - 2018-04-11
      Post awaiting moderation.
  • RBRi

    RBRi - 2016-11-11

    Did a first impl, please report if it solves your case.
    A snapshot build is available.

     
  • Comment has been marked as spam. 
    Undo

    You can see all pending comments posted by this user  here

    Anonymous

    Anonymous - 2016-11-22

    tested with 0.9.21-SNAPSHOT, parser now correctly keeps the unicode-range unchanged

     
  • RBRi

    RBRi - 2016-11-22

    Thnaks for your feedback, will close this.

     
  • RBRi

    RBRi - 2016-11-22
    • status: pending --> closed
     

Anonymous
Anonymous

Cancel  Add attachments