Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F18110598
D9153.id21741.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
962 B
Referenced Files
None
Subscribers
None
D9153.id21741.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D9153: Properly transform Celerity resource URIs with query strings and anchors
Attached
Detach File
Event Timeline
Log In to Comment