[
https://issues.apache.org/jira/browse/BATIK-1072?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Billow Gao updated BATIK-1072:
------------------------------
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
{code}
<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>
{code}
It should find two valid css styles
{code}
<style>
ol, ul { margin:0; padding:0;}
span.footnodeNumber { padding-right:1em; }
</style>
{code}
Because of the bug, it only find one valid css style, and dropped all others
{code}
<style>
ol, ul { margin:0; padding:0;}
</style>
{code}
Patch will be attached.
was:
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
{code}
<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; }\n"+
</style>
{code}
It should find two valid css styles
{code}
<style>
ol, ul { margin:0; padding:0;}
span.footnodeNumber { padding-right:1em; }\n"+
</style>
{code}
Because of the bug, it only find one valid css style, and dropped all others
{code}
<style>
ol, ul { margin:0; padding:0;}
</style>
{code}
Patch will be attached.
> Batik-Css: Failed to find next available token when there were exception
> ------------------------------------------------------------------------
>
> Key: BATIK-1072
> URL: https://issues.apache.org/jira/browse/BATIK-1072
> Project: Batik
> Issue Type: Bug
> Components: CSS
> Affects Versions: 1.7
> Environment: Batik CSS 1.7
> Reporter: Billow Gao
> Priority: Critical
> Attachments: batik_parser.patch
>
>
> 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
> {code}
> <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>
> {code}
> It should find two valid css styles
> {code}
> <style>
> ol, ul { margin:0; padding:0;}
> span.footnodeNumber { padding-right:1em; }
> </style>
> {code}
> Because of the bug, it only find one valid css style, and dropped all others
> {code}
> <style>
> ol, ul { margin:0; padding:0;}
> </style>
> {code}
> Patch will be attached.
--
This message was sent by Atlassian JIRA
(v6.2#6252)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]