Bug 1100368: css concatenation breaks data: urls

r=dylan,a=glob


git-svn-id: svn://10.0.0.236/trunk@265675 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
bzrmirror%bugzilla.org 2014-11-18 05:00:51 +00:00
parent 5cb740a97a
commit a20397a6c0
3 changed files with 5 additions and 3 deletions

View File

@ -1 +1 @@
9209
9210

View File

@ -1 +1 @@
a50e8fd42e682ac115792677104a467445a1c0ad
47da91d22f0799f8eedc160909efbbc6feda0afd

View 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 . ')';
}