Commit 5bda2fe0 by Klimov Paul

`yii\console\controllers\AssetController` now correctly handles relative image…

`yii\console\controllers\AssetController` now correctly handles relative image URLs if source and target CSS are under same directory
parent 0a6cd619
......@@ -7,6 +7,7 @@ Yii Framework 2 Change Log
- Bug #6919: Fixed wrong namespaces under advanced application's TestCase classes (ivokund)
- Bug #6940: `yii\web\Response::sendContentAsFile()` may not send correct `content-length` header (sadgnome)
- Bug #6969: `yii\helpers\ArrayHelper::htmlEncode()` and `htmlDecode()` should not remove non-string data (qiangxue)
- Bug #7037: `yii\console\controllers\AssetController` now correctly handles relative image URLs if source and target CSS are under same directory (klimov-paul)
- Enh #5663: Added support for using `data-params` to specify additional form data to be submitted via the `data-method` approach (usualdesigner, qiangxue)
- Enh #6106: Added ability to specify `encode` for each item of `yii\widgets\Breadcrumbs` (samdark, aleksanderd)
- Enh #6493: Added support for the `Access-Control-Expose-Headers` header by `yii\filters\Cors` (usualdesigner)
......
......@@ -613,6 +613,9 @@ EOD;
if (strpos($inputUrl, '/') === 0 || preg_match('/^https?:\/\//is', $inputUrl) || preg_match('/^data:/is', $inputUrl)) {
return $fullMatch;
}
if ($inputFileRelativePathParts === $outputFileRelativePathParts) {
return $fullMatch;
}
if (empty($outputFileRelativePathParts)) {
$outputUrlParts = [];
......
......@@ -466,6 +466,12 @@ EOL;
'/test/base/path/assets/output',
'.static-root-relative-class {background-image: url(\'/images/static_root_relative.png\');}',
],
[
'.published-relative-dir-class {background-image: url(../img/same_relative_dir.png);}',
'/test/base/path/assets/css',
'/test/base/path/assets/css',
'.published-relative-dir-class {background-image: url(../img/same_relative_dir.png);}',
],
];
}
......
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