[CSSTidy] SF.net SVN: csstidy: [85] trunk/class.csstidy.php
Status: Inactive
Brought to you by:
floele
From: <si...@us...> - 2007-08-24 18:02:36
|
Revision: 85 http://csstidy.svn.sourceforge.net/csstidy/?rev=85&view=rev Author: sined_ Date: 2007-08-24 11:02:27 -0700 (Fri, 24 Aug 2007) Log Message: ----------- Temporarily disable this optimization to avoid problems with @charset rule, quote propertie and some of attribute selectors?\226?\128?\166 Modified Paths: -------------- trunk/class.csstidy.php Modified: trunk/class.csstidy.php =================================================================== --- trunk/class.csstidy.php 2007-08-24 17:49:07 UTC (rev 84) +++ trunk/class.csstidy.php 2007-08-24 18:02:27 UTC (rev 85) @@ -432,7 +432,7 @@ $i--; } - if($add != '\\' || !$this->get_cfg('remove_bslash') || strpos($tokens, $string{$i+1}) !== false) { + if($add !== '\\' || !$this->get_cfg('remove_bslash') || strpos($tokens, $string{$i+1}) !== false) { return $add; } @@ -792,7 +792,7 @@ $this->status = 'ip'; } } - elseif($string{$i} != '}') + elseif($string{$i} !== '}') { $this->sub_value .= $string{$i}; } @@ -891,9 +891,10 @@ if($string{$i} == $this->str_char && !csstidy::escaped($string,$i) && !$this->str_in_str) { $this->status = $this->from; - if (!preg_match('|[' . implode('', $GLOBALS['csstidy']['whitespace']) . ']|uis', $this->cur_string) && $this->property != 'content') { + if (!preg_match('|[' . implode('', $GLOBALS['csstidy']['whitespace']) . ']|uis', $this->cur_string) && $this->property !== 'content') { if ($this->str_char === '"' || $this->str_char === '\'') { - $this->cur_string = substr($this->cur_string, 1, -1); + // Temporarily disable this optimization to avoid problems with @charset rule, quote propertie... + //$this->cur_string = substr($this->cur_string, 1, -1); } else if (strlen($this->cur_string) > 3 && ($this->cur_string[1] === '"' || $this->cur_string[1] === '\'')) /* () */ { $this->cur_string = $this->cur_string[0] . substr($this->cur_string, 2, -2) . substr($this->cur_string, -1); } @@ -979,7 +980,7 @@ */ function escaped(&$string,$pos) { - return !(@($string{$pos-1} != '\\') || csstidy::escaped($string,$pos-1)); + return !(@($string{$pos-1} !== '\\') || csstidy::escaped($string,$pos-1)); } /** This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |