From: Byron Jones Date: Tue, 18 Nov 2014 04:46:18 +0000 (+0800) Subject: Bug 1100368: css concatenation breaks data: urls X-Git-Tag: bugzilla-5.0rc1~37 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f43045dfb7e05c3032ab702922dbad4a7a9ae403;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 bb8ff3b742..3703c9188a 100644 --- a/Bugzilla/Template.pm +++ b/Bugzilla/Template.pm @@ -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 . ')'; }