Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 296283

CSS Aggregation breaks URLs with Query String

$
0
0

Problem/Motivation

Enabled CSS Aggregation breaks file urls with Query Strings (in my case generated by sass/compass). The url is encoded twice after running through CssOptimizer::rewriteFileURI.

This example shows the issue.

<?php
$url
= 'sites/default/files/logo.png?123';
print
file_create_url($url);
// Result: 'http://example.com/sites/default/files/logo.png%3F123'
// Expected: 'http://example.com/sites/default/files/logo.png?123'
?>

Proposed resolution

Preserve the query string to enable cache busting with other preprocess libs outside of Drupal.

Remaining tasks

Contributor tasks needed
TaskNovice task?Contributor instructionsComplete?
Add automated testsInstructions
Review patch to ensure that it fixes the issue, stays within scope, is properly documented, and follows coding standardsInstructions

User interface changes

API changes


Viewing all articles
Browse latest Browse all 296283

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>