Skip to content

Commit

Permalink
Changed strncmp() to strncasecmp(), ... (#77)
Browse files Browse the repository at this point in the history
...then it also detects "RGB(" in capital letters, and "Rgb(" in mixed letters. In line 338 it's already correct.
  • Loading branch information
PHPGangsta authored Dec 1, 2022
1 parent 436c69d commit 18fe3ff
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion class.csstidy_optimise.php
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ public function cut_color($color) {
return $color;

/* expressions complexes de type gradient */
if (strpos($color, '(') !== false && strncmp($color, 'rgb(' ,4) != 0) {
if (strpos($color, '(') !== false && strncasecmp($color, 'rgb(' ,4) != 0) {
// on ne touche pas aux couleurs dans les expression ms, c'est trop sensible
if (stripos($color, 'progid:') !== false)
return $color;
Expand Down

0 comments on commit 18fe3ff

Please sign in to comment.