]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 1100368: css concatenation breaks data: urls
authorByron Jones <glob@mozilla.com>
Tue, 18 Nov 2014 04:46:11 +0000 (12:46 +0800)
committerByron Jones <glob@mozilla.com>
Tue, 18 Nov 2014 04:46:11 +0000 (12:46 +0800)
r=dylan,a=glob

Bugzilla/Template.pm

index 7ce1be72bc6b1d2e6bb195d32c8b6613f0e6b284..26ef375859646346f93d98ef2ea3dff6492fa233 100644 (file)
@@ -541,7 +541,9 @@ sub _css_url_rewrite {
     # rewrite relative urls as the unified stylesheet lives in a different
     # directory from the source
     $url =~ s/(^['"]|['"]$)//g;
-    return $url if substr($url, 0, 1) eq '/';
+    if (substr($url, 0, 1) eq '/' || substr($url, 0, 5) eq 'data:') {
+        return 'url(' . $url . ')';
+    }
     return 'url(../../' . dirname($source) . '/' . $url . ')';
 }