Support for data urls in css aggr.
parent
36ca38705f
commit
633186c0d5
|
@ -178,7 +178,7 @@ class H5PDefaultStorage implements \H5PFileStorage {
|
||||||
$content .= preg_replace_callback(
|
$content .= preg_replace_callback(
|
||||||
'/url\([\'"]?([^"\')]+)[\'"]?\)/i',
|
'/url\([\'"]?([^"\')]+)[\'"]?\)/i',
|
||||||
function ($matches) use ($cssRelPath) {
|
function ($matches) use ($cssRelPath) {
|
||||||
if (preg_match("/^([a-z0-9]+:)?\//i", $matches[1]) === 1) {
|
if (preg_match("/^(data:|([a-z0-9]+:)?\/)/i", $matches[1]) === 1) {
|
||||||
return $matches[0]; // Not relative, skip
|
return $matches[0]; // Not relative, skip
|
||||||
}
|
}
|
||||||
return 'url("../' . $cssRelPath . $matches[1] . '")';
|
return 'url("../' . $cssRelPath . $matches[1] . '")';
|
||||||
|
|
Loading…
Reference in New Issue