Index: trunk/phase3/includes/libs/JavaScriptDistiller.php |
— | — | @@ -32,8 +32,8 @@ |
33 | 33 | private static function stripComments( $script ) { |
34 | 34 | $parser = self::createParser(); |
35 | 35 | // Remove comments |
36 | | - $parser->add( '/\\/\\/[^\\r\\n]*[\\r\\n]/' ); |
37 | | - $parser->add( '/\\/\\*[^*]*\\*+([^\\/][^*]*\\*+)*\\//' ); |
| 36 | + $parser->add( '/\'([^\'\\\\]*(\\\\.[^\'\\\\]*)*)\'/', '$1' ); |
| 37 | + $parser->add( '/"([^"\\\\]*(\\\\.[^"\\\\]*)*)"/', '$1' ); |
38 | 38 | // Execute and return |
39 | 39 | return $parser->exec( $script ); |
40 | 40 | } |