Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.5.4

Bug #20087 Cannot parse some CSS, undefined index
Submitted: 2013-10-07 14:23 UTC
From: marek_sykora Assigned:
Status: Open Package: HTML_CSS (version 1.5.4)
PHP Version: 5.3.14 OS: Ubuntu
Roadmaps: (Not assigned)    
Subscription  


 [2013-10-07 14:23 UTC] marek_sykora (Marek Sykora)
Description: ------------ 1. prepare a CSS using asterix in selector 2. try to parse Actual result: php fatal error "Undefined index" raises. Other format rules must be kept to avoid such errors, I found out: - all regexp chars in selector are dangerous, not only the asterix - no space between selectors are dangerous, e.g "H1,H2" - every selector must be on new line Test script: --------------- $cssString = ' table * { padding: 0 } '; $parser = new HTML_CSS(); $parser->parseString($cssString); Expected result: ---------------- No errors, any CSS string acceptable by browser could be used. Workaround: wrap the parser into own class and handle input string to be in expected format. Actual result: -------------- Php fatal errors.

Comments

 [2013-10-07 14:29 UTC] marek_sykora (Marek Sykora)
-Summary: Cannot parse unformatted CSS +Summary: Cannot parse some CSS, undefined index