From 158c26e49b6f7c69c20fa0b14722092180220a84 Mon Sep 17 00:00:00 2001 From: Roan Kattouw Date: Tue, 8 Feb 2011 10:26:30 +0000 Subject: [PATCH] Reimplement r80900, was lost when code was moved around --- includes/libs/JavaScriptDistiller.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/libs/JavaScriptDistiller.php b/includes/libs/JavaScriptDistiller.php index 3e0a00f8fe..dd0c35d7f8 100644 --- a/includes/libs/JavaScriptDistiller.php +++ b/includes/libs/JavaScriptDistiller.php @@ -77,8 +77,8 @@ class JavaScriptDistiller { // Protect strings. The original code had [^\'\\v] here, but that didn't armor multiline // strings correctly. This also armors multiline strings that don't have backslashes at the // end of the line (these are invalid), but that's fine because we're just armoring here. - $parser->add( '/\'[^\']*\'/', '$1' ); - $parser->add( '/"[^"]*"/', '$1' ); + $parser->add( '/\'([^\'\\\\]*(\\\\.[^\'\\\\]*)*)\'/', '$1' ); + $parser->add( '/"([^"\\\\]*(\\\\.[^"\\\\]*)*)"/', '$1' ); // Protect regular expressions $parser->add( '/[ \\t]+(\\/[^\\/\\r\\n\\*][^\\/\\r\\n]*\\/g?i?)/', '$2' ); $parser->add( '/[^\\w\\$\\/\'"*)\\?:]\\/[^\\/\\r\\n\\*][^\\/\\r\\n]*\\/g?i?/', '$1' ); -- 2.20.1