Page MenuHomePhabricator

CSSMin function remap not respecting $embed
Closed, ResolvedPublic

Description

Author: gilles0181

Description:
The parameter list of CSSMin::Remap allows for the option $embed with which you can set if the embedding of images has to be done. Currently the $embed variable is overwritten at position 150 ($embed = $match['embed'][0];).

Suggestion:
Change the function params to this:
public static function remap( $source, $local, $remote, $embed_data = true )


and at line 159-160, change:

// Embedding requires a bit of extra processing, so let's skip that if we can
if ( $embed ) {


to:

// Embedding requires a bit of extra processing, so let's skip that if we can
if ( $embed_data && $embed ) {

This way, even if CSSMin finds /* @embed */ comments it can be overwritten for performance/size reasons.


Version: 1.18.x
Severity: normal

Details

Reference
bz34114

Event Timeline

bzimport raised the priority of this task from to Low.Nov 22 2014, 12:14 AM
bzimport set Reference to bz34114.
bzimport added a subscriber: Unknown Object (MLST).

Thanks for the patch, applied in r110557.