r72365 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r72364‎ | r72365 | r72366 >
Date:10:20, 4 September 2010
Author:tparscal
Status:ok
Tags:
Comment:
Fixes bug introduced r71767 - the stripping of = from the right side of data URLs. Aparently this was misdiagnosed and Firefox was tollerant of it. By removing it, as suggested by Nikerabbit, images are working in Gecko and Webkit.
Modified paths:
  • /trunk/phase3/includes/CSSMin.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/CSSMin.php
@@ -62,7 +62,7 @@
6363 // If we ever get to PHP 5.3, we should use the Fileinfo extension instead of mime_content_type
6464 $type = mime_content_type( $file );
6565 // Strip off any trailing = symbols (makes browsers freak out)
66 - $data = rtrim( base64_encode( file_get_contents( $file ) ), '=' );
 66+ $data = base64_encode( file_get_contents( $file ) );
6767 // Build 2 CSS properties; one which uses a base64 encoded data URI in place of the @embed
6868 // comment to try and retain line-number integrity , and the other with a remapped an versioned
6969 // URL and an Internet Explorer hack making it ignored in all browsers that support data URIs

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r71767Improved performance of CSSMin::minify by using arrays with str_replace and p...tparscal23:36, 26 August 2010

Status & tagging log