diff options
author | Byron Jones <glob@mozilla.com> | 2014-11-18 05:45:08 +0100 |
---|---|---|
committer | Byron Jones <glob@mozilla.com> | 2014-11-18 05:45:08 +0100 |
commit | e4bc2084f4c9f8ec5d411a9b41915eab0104eca0 (patch) | |
tree | 65b2ff889fdfade5c3c47f9c3809f0f1d850e6e8 | |
parent | 891689f1fdf09bf06c5e5dd944f6a6ae43f2cfd8 (diff) | |
download | bugzilla-e4bc2084f4c9f8ec5d411a9b41915eab0104eca0.tar.gz bugzilla-e4bc2084f4c9f8ec5d411a9b41915eab0104eca0.tar.xz |
Bug 1100368: css concatenation breaks data: urls
-rw-r--r-- | Bugzilla/Template.pm | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Bugzilla/Template.pm b/Bugzilla/Template.pm index 9bd0c51bd..be84bc66a 100644 --- a/Bugzilla/Template.pm +++ b/Bugzilla/Template.pm @@ -521,7 +521,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 . ')'; } |