From 47da91d22f0799f8eedc160909efbbc6feda0afd Mon Sep 17 00:00:00 2001 From: Byron Jones Date: Tue, 18 Nov 2014 12:46:11 +0800 Subject: Bug 1100368: css concatenation breaks data: urls r=dylan,a=glob --- Bugzilla/Template.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Bugzilla/Template.pm b/Bugzilla/Template.pm index 7ce1be72b..26ef37585 100644 --- a/Bugzilla/Template.pm +++ b/Bugzilla/Template.pm @@ -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 . ')'; } -- cgit v1.2.3-24-g4f1b