r81708 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r81707‎ | r81708 | r81709 >
Date:10:28, 8 February 2011
Author:catrope
Status:ok
Tags:
Comment:
1.17wmf1: MFT r81707
Modified paths:
  • /branches/wmf/1.17wmf1/includes/libs/JavaScriptDistiller.php (modified) (history)

Diff [purge]

Index: branches/wmf/1.17wmf1/includes/libs/JavaScriptDistiller.php
@@ -77,8 +77,8 @@
7878 // Protect strings. The original code had [^\'\\v] here, but that didn't armor multiline
7979 // strings correctly. This also armors multiline strings that don't have backslashes at the
8080 // 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' );
8383 // Protect regular expressions
8484 $parser->add( '/[ \\t]+(\\/[^\\/\\r\\n\\*][^\\/\\r\\n]*\\/g?i?)/', '$2' );
8585 $parser->add( '/[^\\w\\$\\/\'"*)\\?:]\\/[^\\/\\r\\n\\*][^\\/\\r\\n]*\\/g?i?/', '$1' );

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r81707Reimplement r80900, was lost when code was moved aroundcatrope10:26, 8 February 2011

Status & tagging log