Subject: | Bug in selector parsing in CSS::Tiny |
Hi,
There exists a fairly simple bug in parsing of rulesets during a read
operation within CSS::Tiny. Basically Tiny breaks if you have excess
whitespace within the selector. This rule would break:
.test .bodySettings {
font-size:12px;
margin:5px 5px 5px 5px;
padding:0 0 0 0;
}
Note the extra white-space preceding .bodySettings - there are 2
spaces here not one.
To fix this is pretty trivial though - apply the following:
======================
50a51
Show quoted text
> my $props = $2;
56c61,62
< foreach ( grep { /\S/ } split /\;/, $2 ) {
---
Show quoted text> foreach ( grep { /\S/ } split /\;/, $props ) {
======================
The bug is caused by stomping of the perl special vars, so we just
create placeholders.
thanks, we use your module for CSS::Inliner, it helps a lot.
-Kevin Kamel