Commit f65d1398 by Klimov Paul

Added skipping for absolute URLs at "AssetController::adjustCssUrl()".

parent 2635b477
......@@ -558,6 +558,10 @@ EOD
$fullMatch = $matches[0];
$inputUrl = $matches[1];
if (preg_match('/https?:\/\//is', $inputUrl)) {
return $fullMatch;
}
$outputUrlParts = array_fill(0, count($outputFileRelativePathParts), '..');
$outputUrlParts = array_merge($outputUrlParts, $inputFileRelativePathParts);
......
......@@ -286,6 +286,18 @@ class AssetControllerTest extends TestCase
'/test/base/path/assets/output',
'.static-relative-dir-class {background-image: url("../../img/static_relative_dir.png");}',
),
array(
'.absolute-url-class {background-image: url(http://domain.com/img/image.gif);}',
'/test/base/path/assets/input',
'/test/base/path/assets/output',
'.absolute-url-class {background-image: url(http://domain.com/img/image.gif);}',
),
array(
'.absolute-url-secure-class {background-image: url(https://secure.domain.com/img/image.gif);}',
'/test/base/path/assets/input',
'/test/base/path/assets/output',
'.absolute-url-secure-class {background-image: url(https://secure.domain.com/img/image.gif);}',
),
);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment