Page MenuHomePhabricator

D9153.id21741.diff
No OneTemporary

D9153.id21741.diff

diff --git a/src/infrastructure/celerity/CelerityResourceTransformer.php b/src/infrastructure/celerity/CelerityResourceTransformer.php
--- a/src/infrastructure/celerity/CelerityResourceTransformer.php
+++ b/src/infrastructure/celerity/CelerityResourceTransformer.php
@@ -111,6 +111,17 @@
public function translateResourceURI(array $matches) {
$uri = trim($matches[1], "'\" \r\t\n");
+ $tail = '';
+
+ // If the resource URI has a query string or anchor, strip it off before
+ // we go looking for the resource. We'll stitch it back on later. This
+ // primarily affects FontAwesome.
+
+ $parts = preg_split('/(?=[?#])/', $uri, 2);
+ if (count($parts) == 2) {
+ $uri = $parts[0];
+ $tail = $parts[1];
+ }
$alternatives = array_unique(
array(
@@ -142,7 +153,7 @@
}
}
- return 'url('.$uri.')';
+ return 'url('.$uri.$tail.')';
}
private function replaceCSSVariables($path, $data) {

File Metadata

Mime Type
text/plain
Expires
Tue, Aug 12, 9:32 PM (3 w, 4 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
8794306
Default Alt Text
D9153.id21741.diff (962 B)

Event Timeline