From: Byron Jones Date: Tue, 18 Nov 2014 04:46:11 +0000 (+0800) Subject: Bug 1100368: css concatenation breaks data: urls X-Git-Tag: release-5.1.1~455 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=47da91d22f0799f8eedc160909efbbc6feda0afd;p=thirdparty%2Fbugzilla.git Bug 1100368: css concatenation breaks data: urls r=dylan,a=glob --- diff --git a/Bugzilla/Template.pm b/Bugzilla/Template.pm index 7ce1be72bc..26ef375859 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 . ')'; }