1
0
mirror of https://github.com/mrclay/minify.git synced 2025-08-20 12:51:52 +02:00

URI rewriter passes through empty URLs

Fixes #561
This commit is contained in:
Steve Clay
2017-01-18 18:48:15 -05:00
parent d1786045b2
commit 12b9096b23
5 changed files with 13 additions and 0 deletions

View File

@@ -294,6 +294,11 @@ class Minify_CSS_UriRewriter
$uri = ($quoteChar === '') ? $m[1] : substr($m[1], 1, strlen($m[1]) - 2);
}
if ($uri === '') {
return $m[0];
}
// if not root/scheme relative and not starts with scheme
if (!preg_match('~^(/|[a-z]+\:)~', $uri)) {
// URI is file-relative: rewrite depending on options