Fix url defined in css

--HG--
extra : rebase_source : 4369c8c5b15840765e7f09d57e7c9173eb26a61f
This commit is contained in:
Sébastien Lucas 2013-08-30 22:15:05 +02:00
parent e6d18cfbe4
commit 37df70c1ce

View file

@ -42,14 +42,19 @@ try {
$path = $matches [1];
$hash = "#" . $matches [2];
}
$end = "";
if (preg_match ("/^src:/", $method)) {
$end = ")";
}
$comp = $book->getComponentName ($component, $path);
if (!$comp) return "#";
return "$method'epubfs.php?{$add}comp={$comp}{$hash}'";
return "$method'epubfs.php?{$add}comp={$comp}{$hash}'{$end}";
};
$data = preg_replace_callback ("/(src=)[\"']([^:]*?)[\"']/", $callback, $data);
$data = preg_replace_callback ("/(href=)[\"']([^:]*?)[\"']/", $callback, $data);
$data = preg_replace_callback ("/(\@import\s+)[\"'](.*?)[\"'];/", $callback, $data);
$data = preg_replace_callback ("/(src:\s+url\()(.*?)\)/", $callback, $data);
$expires = 60*60*24*14;
header("Pragma: public");