rgrove / jsmin-php

:skull: PHP port of Douglas Crockford's JSMin JavaScript minifier. No longer maintained.
423 stars 128 forks source link

jsminify fail if strings contain "company's" (company with possession) #9

Closed craigcosmo closed 13 years ago

craigcosmo commented 13 years ago

strings that contain words such ass company's, father's, mom's will fail the script.

rgrove commented 13 years ago

Please provide an example of some code that causes a failure.

craigcosmo commented 13 years ago
$str = "company's";
$this->jsmin->minify($str);

just default usage, no config

rgrove commented 13 years ago

That's a PHP string containing the text company's, which is not valid JavaScript by itself. JSMin can't minify invalid JavaScript.