]> 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:18 +0000 (12:46 +0800)
committerByron Jones <glob@mozilla.com>
Tue, 18 Nov 2014 04:46:18 +0000 (12:46 +0800)
r=dylan,a=glob

Bugzilla/Template.pm

index bb8ff3b742c98353ec193d3aa098beeaeb43a5f4..3703c9188a7db4f2766d76e93807ddfca5db7b2b 100644 (file)
@@ -539,7 +539,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 . ')';
 }