mirror of
https://github.com/yiisoft/yii2.git
synced 2025-08-26 14:26:54 +08:00
Fixed yii\console\controllers\AssetController::adjustCssUrl()
breaks URL reference specification (url(#id)
)
This commit is contained in:
@ -24,6 +24,7 @@ Yii Framework 2 Change Log
|
||||
- Bug #12939: Hard coded table names for MSSQL in RBAC migration (arogachev)
|
||||
- Bug #12974: Fixed incorrect order of migrations history in case `yii\console\controllers\MigrateController::$migrationNamespaces` is in use (evgen-d, klimov-paul)
|
||||
- Bug #13071: Help option for commands was not working in modules (arogachev, haimanman)
|
||||
- Bug #13089: Fixed `yii\console\controllers\AssetController::adjustCssUrl()` breaks URL reference specification (`url(#id)`) (vitalyzhakov)
|
||||
- Bug #7727: Fixed truncateHtml leaving extra tags (developeruz)
|
||||
- Enh #6809: Added `\yii\caching\Cache::$defaultDuration` property, allowing to set custom default cache duration (sdkiller)
|
||||
- Enh #7333: Improved error message for `yii\di\Instance::ensure()` when a component does not exist (cebe)
|
||||
|
@ -638,7 +638,7 @@ EOD;
|
||||
$fullMatch = $matches[0];
|
||||
$inputUrl = $matches[1];
|
||||
|
||||
if (strpos($inputUrl, '/') === 0 || preg_match('/^https?:\/\//i', $inputUrl) || preg_match('/^data:/i', $inputUrl)) {
|
||||
if (strpos($inputUrl, '/') === 0 || strpos($inputUrl, '#') === 0 || preg_match('/^https?:\/\//i', $inputUrl) || preg_match('/^data:/i', $inputUrl)) {
|
||||
return $fullMatch;
|
||||
}
|
||||
if ($inputFileRelativePathParts === $outputFileRelativePathParts) {
|
||||
|
@ -537,6 +537,12 @@ EOL;
|
||||
'/test/base/path/assets/css',
|
||||
'.published-relative-dir-class {background-image: url(../img/same_relative_dir.png);}',
|
||||
],
|
||||
[
|
||||
"img {clip-path: url(#xxx)}",
|
||||
'/test/base/path/css',
|
||||
'/test/base/path/assets/output',
|
||||
"img {clip-path: url(#xxx)}",
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user