searchturbine / phpwee-php-minifier

Open-source (BSD) PHP inline minifier functions for HTML, XHTML, HTML5, CSS 1-3 and Javascript. http://searchturbine.com/php/phpwee
Other
79 stars 46 forks source link

[ bug ] conditional statement gets stripped #15

Open jonleverrier opened 8 years ago

jonleverrier commented 8 years ago

I've got the following markup in my doc...its part of a standard html5 boilerplate.

<!--[if gte IE 9]><!-->
<html lang="en" class="hasJs">
<!--<![endif]-->

the entire endif statement below the opening html tag gets stripped

ashucg commented 7 years ago

Hi,

Not sure if you were able to fix the issue, but just for future reference, please replace if( strpos($val,'[')!==0){ on line 52 with if( strpos($val,'[')===false){ in HtmlMin.php file.

Thanks!