r72685 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r72684‎ | r72685 | r72686 >
Date:21:41, 9 September 2010
Author:tparscal
Status:ok
Tags:
Comment:
Fixes issues with complex background rules containing extra information after the URL, while using quotes within the url.
Modified paths:
  • /trunk/phase3/includes/libs/CSSMin.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/libs/CSSMin.php
@@ -82,7 +82,7 @@
8383 * @return string Remapped CSS data
8484 */
8585 public static function remap( $source, $path, $embed = true ) {
86 - $pattern = '/((?<embed>\s*\/\*\s*\@embed\s*\*\/)(?<rule>[^\;\}]*))?url\([\'"]?(?<file>[^\?\)\:]*)\??[^\)]*[\'"]?\)(?<extra>[^;]*)[\;]?/';
 86+ $pattern = '/((?<embed>\s*\/\*\s*\@embed\s*\*\/)(?<rule>[^\;\}]*))?url\([\'"]?(?<file>[^\?\)\:\'"]*)\??[^\)\'"]*[\'"]?\)(?<extra>[^;]*)[\;]?/';
8787 $offset = 0;
8888 while ( preg_match( $pattern, $source, $match, PREG_OFFSET_CAPTURE, $offset ) ) {
8989 // Shortcuts

Status & tagging log