r82358 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r82357‎ | r82358 | r82359 >
Date:22:37, 17 February 2011
Author:catrope
Status:deferred
Tags:
Comment:
1.17wmf1: MFT r82357
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( '/\'([^\'\\\\]*(\\\\(.|[\r\n])[^\'\\\\]*)*)\'/', '$1' );
 82+ $parser->add( '/"([^"\\\\]*(\\\\(.|[\r\n])[^"\\\\]*)*)"/', '$1' );
8383 // Protect regular expressions
8484 $parser->add( '/[ \\t]+((\\/[^\\r\\n\\*][^\\/\\r\\n\\\\]*(\\\\.[^\\/\\r\\n\\\\]*)*\\/(i|g)*))/', '$1' );
8585 $parser->add( '/([^\\w\\$\\/\'"*)\\?:](\\/[^\\r\\n\\*][^\\/\\r\\n\\\\]*(\\\\.[^\\/\\r\\n\\\\]*)*\\/(i|g)*))/', '$1' );
Property changes on: branches/wmf/1.17wmf1/includes/libs/JavaScriptDistiller.php
___________________________________________________________________
Modified: svn:mergeinfo
8686 Merged /trunk/phase3/includes/libs/JavaScriptDistiller.php:r82357

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r82357Fix a bug in string recognition in JSDistiller. This *really* fixes bug 27481catrope22:36, 17 February 2011

Status & tagging log