r82456 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r82455‎ | r82456 | r82457 >
Date:14:46, 19 February 2011
Author:catrope
Status:ok
Tags:
Comment:
Revert r82218 , doesn't fix absolute path URLs but breaks them. Will fix properly in next commit
Modified paths:
  • /trunk/phase3/includes/libs/CSSMin.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/libs/CSSMin.php
@@ -120,8 +120,8 @@
121121 self::URL_REGEX . '(?P<post>[^;]*)[\;]?/';
122122 $offset = 0;
123123 while ( preg_match( $pattern, $source, $match, PREG_OFFSET_CAPTURE, $offset ) ) {
124 - // Skip absolute URIs and relative URIs with absolute paths
125 - if ( preg_match( '/^(\/|https?:\/\/)/', $match['file'][0] ) ) {
 124+ // Skip absolute URIs
 125+ if ( preg_match( '/^https?:\/\//', $match['file'][0] ) ) {
126126 // Move the offset to the end of the match, leaving it alone
127127 $offset = $match[0][1] + strlen( $match[0][0] );
128128 continue;

Follow-up revisions

RevisionCommit summaryAuthorDate
r825331.17wmf1: MFT r78893, r78897, r78909, r82404, r82408, r82409, r82453, r82456,...catrope20:13, 20 February 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r82218Followup r82156: skip relative URLs with absolute paths toocatrope06:27, 16 February 2011

Status & tagging log