WebLoader
WebLoader copied to clipboard
BUG: data-url should be treated as absolute
The CssUrlsFilter breaks the value of the CSS Data URL by adding for example /cache/ prefix to them so u get something like this in your processed stylesheet:
image: url('/cache/data:image/png,base64,iVBORw0KGgo...');
That condition should be changed to something like this (which actualy works for me)
// is already absolute
if (preg_match('/^data:|([a-z]+:\/)?\//', $url)) {
return $url;
}
I'm not really sure I understand the issue.
I have updated the description, is it now more clear?
:rabbit2:
Now it's clear :)
There some edge cases where CssUrlsFilter is not working properly. We will create better test case and try to solve these issues before releasing new stable version.
Spíše bych řekl
if (preg_match("/^(data:|([a-z]+:\/)?\/)/", $url)) return $url;
@martinknor : IMHO, není třeba přidávat závorky, vzhledem k tomu že nás zajímá jenom jestli se regulár matchne nebo nikoliv.
Asi by to chtělo spíš testy, abychom měli jistotu :)