Uploaded image for project: 'Batik'
  1. Batik
  2. BATIK-1072

Batik-Css: Failed to find next available token when there were exception

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Critical
    • Resolution: Unresolved
    • 1.7
    • None
    • CSS
    • None
    • Batik CSS 1.7

    Description

      In reportError, Batik CSS parser will try to find the next token.
      But the logic was wrong and it will skip all text.
      For example, if you have css like below

      <style>
          ol, ul { margin:0; padding:0;}
          <!-- wrong not css but comment -->
          li spanwithextradot. { clear: both; line-height:0; width:0; height:0; margin:0; padding:0; }
          span.footnodeNumber { padding-right:1em; }
      </style>
      

      It should find two valid css styles

      <style>
          ol, ul { margin:0; padding:0;}
          span.footnodeNumber { padding-right:1em; }
      </style>
      

      Because of the bug, it only find one valid css style, and dropped all others

      <style>
          ol, ul { margin:0; padding:0;}
      </style>
      

      Patch will be attached.

      Attachments

        1. batik_parser.patch
          1 kB
          Billow Gao

        Activity

          People

            Unassigned Unassigned
            billowgao Billow Gao
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: