r79960 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r79959‎ | r79960 | r79961 >
Date:21:31, 10 January 2011
Author:tparscal
Status:ok (Comments)
Tags:
Comment:
Resolves bug #26655 - adds support for space before and after the URL inside the parenthesis of a url() statement in CSS.
Modified paths:
  • /trunk/phase3/includes/libs/CSSMin.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/libs/CSSMin.php
@@ -36,7 +36,7 @@
3737 * which when base64 encoded will result in a 1/3 increase in size.
3838 */
3939 const EMBED_SIZE_LIMIT = 24576;
40 - const URL_REGEX = 'url\([\'"]?(?P<file>[^\?\)\:\'"]*)\??[^\)\'"]*[\'"]?\)';
 40+ const URL_REGEX = 'url\(\s*[\'"]?(?P<file>[^\?\)\:\'"]*)\??[^\)\'"]*[\'"]?\s*\)';
4141
4242 /* Protected Static Members */
4343

Follow-up revisions

RevisionCommit summaryAuthorDate
r801751.17: MFT r79960, r80034, r80036, r80043, r80044, r80050, r80053, r80074, r80...catrope17:13, 13 January 2011

Comments

#Comment by Catrope (talk | contribs)   20:10, 12 January 2011

What about url (foo), is that legal?

#Comment by Trevor Parscal (WMF) (talk | contribs)   21:23, 12 January 2011

No, that is not legal, nor does it seem to work in Chrome, FF or IE. I think we're covering all legal CSS url statements now.

#Comment by Catrope (talk | contribs)   21:23, 12 January 2011

Cool, thanks for checking.

Status & tagging log