mirror of
https://github.com/yiisoft/yii2.git
synced 2025-08-26 06:15:19 +08:00
Fixed yii\console\controllers\AssetController
breaks CSS URLs, which start from '/'
This commit is contained in:
@ -8,6 +8,7 @@ Yii Framework 2 Change Log
|
||||
- Bug #4889: Application was getting into redirect loop when user wasn't allowed accessing login page. Now shows 403 (samdark)
|
||||
- Bug #5402: Debugger was not loading when there were closures in asset classes (samdark)
|
||||
- Bug #5452: Errors occurring after the response is sent are not displayed (qiangxue)
|
||||
- Bug #5521: Fixed `yii\console\controllers\AssetController` breaks CSS URLs, which start from '/' (klimov-paul)
|
||||
- Bug #5570: `yii\bootstrap\Tabs` would throw an exception if `content` is not set for one of its `items` (RomeroMsk)
|
||||
- Bug #5584: `yii\rbac\DbRbacManager` should not delete items when deleting a rule on a database not supporting cascade update (mdmunir)
|
||||
- Bug #5601: Simple conditions in Query::where() and ActiveQuery::where() did not allow `yii\db\Expression` to be used as the value (cebe, stevekr)
|
||||
|
@ -565,7 +565,7 @@ EOD;
|
||||
$fullMatch = $matches[0];
|
||||
$inputUrl = $matches[1];
|
||||
|
||||
if (preg_match('/^https?:\/\//is', $inputUrl) || preg_match('/^data:/is', $inputUrl)) {
|
||||
if (strpos($inputUrl, '/') === 0 || preg_match('/^https?:\/\//is', $inputUrl) || preg_match('/^data:/is', $inputUrl)) {
|
||||
return $fullMatch;
|
||||
}
|
||||
|
||||
|
@ -386,6 +386,12 @@ EOL;
|
||||
'C:\test\base\path\assets\output',
|
||||
'.published-same-dir-class {background-image: url(../input/published_same_dir.png);}',
|
||||
],
|
||||
[
|
||||
'.static-root-relative-class {background-image: url(\'/images/static_root_relative.png\');}',
|
||||
'/test/base/path/css',
|
||||
'/test/base/path/assets/output',
|
||||
'.static-root-relative-class {background-image: url(\'/images/static_root_relative.png\');}',
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user