--- includes/common.inc +++ includes/common.inc 1926a1927,1966 > * Strips Comments from CSS Content that are not CSS Hacks > * > * @param $csscontent > * CSS Content > * @return > * CSS Content with stripped Comments > */ > function strip_comments($csscontent) > { > $cstart = -1; > $ishack = false; > $result = "a"; > $resultlen = 0; > for ($i = 0; $i < strlen($csscontent); $i++) { > if ( $csscontent[$i] == '/' && $csscontent[$i+1] == '*' && $cstart < 0 ) { > $cstart = $i; > $ishack = false; > } > > if ( $cstart < 0 ) > $result[$resultlen++] = $csscontent[$i]; > > if ($csscontent[$i] == '\\') > $ishack = true; > > if ( $csscontent[$i] == '*' && $csscontent[$i+1] == '/' ) { > if ( $cstart > 0 && ($ishack || ($i - $cstart < 4) ) ) { > for ( $j = $cstart; $j <= $i+1; $j++) > $result[$resultlen++] = $csscontent[$j]; > $cstart = -1; > } > $i++; > $cstart = -1; > } > } > return $result; > } > > > /** 1970d2009 < /\*([^*\\\\]|\*(?!/))+\*/ | # Remove comments that are not CSS hacks. 1972a2012,2014 > // /\*([^*\\\\]|\*(?!/))+\*/ | # Remove comments that are not CSS hacks. > // Remove comments that are not CSS hacks. > $contents = strip_comments($contents); 1974a2017,2018 > >