* which when base64 encoded will result in a 1/3 increase in size.
*/
const EMBED_SIZE_LIMIT = 24576;
- const URL_REGEX = 'url\(\s*[\'"]?(?P<file>[^\?\)\'"]*)\??[^\)\'"]*[\'"]?\s*\)';
+ const URL_REGEX = 'url\(\s*[\'"]?(?P<file>[^\?\)\'"]*)(?P<query>\??[^\)\'"]*)[\'"]?\s*\)';
/* Protected Static Members */
$embed = $match['embed'][0];
$pre = $match['pre'][0];
$post = $match['post'][0];
+ $query = $match['query'][0];
$url = "{$remote}/{$match['file'][0]}";
$file = "{$local}/{$match['file'][0]}";
$replacement = false;
}
} else if ( $local === false ) {
// Assume that all paths are relative to $remote, and make them absolute
- $replacement = "{$embed}{$pre}url({$url}){$post};";
+ $replacement = "{$embed}{$pre}url({$url}{$query}){$post};";
}
if ( $replacement !== false ) {
// Perform replacement on the source