Index: trunk/phase3/includes/libs/JavaScriptDistiller.php |
— | — | @@ -77,8 +77,8 @@ |
78 | 78 | // Protect strings. The original code had [^\'\\v] here, but that didn't armor multiline |
79 | 79 | // strings correctly. This also armors multiline strings that don't have backslashes at the |
80 | 80 | // end of the line (these are invalid), but that's fine because we're just armoring here. |
81 | | - $parser->add( '/\'[^\']*\'/', '$1' ); |
82 | | - $parser->add( '/"[^"]*"/', '$1' ); |
| 81 | + $parser->add( '/\'([^\'\\\\]*(\\\\.[^\'\\\\]*)*)\'/', '$1' ); |
| 82 | + $parser->add( '/"([^"\\\\]*(\\\\.[^"\\\\]*)*)"/', '$1' ); |
83 | 83 | // Protect regular expressions |
84 | 84 | $parser->add( '/[ \\t]+(\\/[^\\/\\r\\n\\*][^\\/\\r\\n]*\\/g?i?)/', '$2' ); |
85 | 85 | $parser->add( '/[^\\w\\$\\/\'"*)\\?:]\\/[^\\/\\r\\n\\*][^\\/\\r\\n]*\\/g?i?/', '$1' ); |