r81707 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r81706‎ | r81707 | r81708 >
Date:10:26, 8 February 2011
Author:catrope
Status:ok (Comments)
Tags:
Comment:
Reimplement r80900, was lost when code was moved around
Modified paths:
  • /trunk/phase3/includes/libs/JavaScriptDistiller.php (modified) (history)

Diff [purge]

Index: trunk/phase3/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' );

Follow-up revisions

RevisionCommit summaryAuthorDate
r817081.17wmf1: MFT r81707catrope10:28, 8 February 2011
r85148MFT: r80495, r80610, r80765, r81177, r81490, r81692, r81707, r81729, r81765, ...demon20:11, 1 April 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r80900Resolves issue in r80656 where escaped quotes within strings are not handled ...tparscal19:47, 24 January 2011

Comments

#Comment by Krinkle (talk | contribs)   18:45, 9 February 2011

Marking ok as the lines added in place are the same in the already ok'ed r80900 (which was a fix for a bug fatally breaking javascript execution in production mode).

Status & tagging log