psliwa / image-optimizer

Image optimization / compression library. This library is able to optimize png, jpg and gif files in very easy and handy way. It uses optipng, pngquant, pngcrush, pngout, gifsicle, jpegoptim and jpegtran tools.
MIT License
909 stars 141 forks source link

'escapeshellarg' -> $escapeShellCmd #45

Closed matjazpotocnik closed 6 years ago

matjazpotocnik commented 7 years ago

Shouldn't

$commandArgs = 0 === count($args) ? '' : ' '.implode(' ', array_map('escapeshellarg', $args));

in Command.php be

$commandArgs = 0 === count($args) ? '' : ' '.implode(' ', array_map($escapeShellCmd, $args));

psliwa commented 6 years ago

No, it is ok. Command's arguments should be always escaped by escapeshellarg function. There is the PR which added workaround for windows platform: https://github.com/psliwa/image-optimizer/pull/11