mirror of
https://github.com/yiisoft/yii2.git
synced 2025-08-14 14:28:27 +08:00
Simplified regular expressions
This commit is contained in:
@ -617,7 +617,7 @@ EOD;
|
||||
$fullMatch = $matches[0];
|
||||
$inputUrl = $matches[1];
|
||||
|
||||
if (strpos($inputUrl, '/') === 0 || preg_match('/^https?:\/\//is', $inputUrl) || preg_match('/^data:/is', $inputUrl)) {
|
||||
if (strpos($inputUrl, '/') === 0 || preg_match('/^https?:\/\//i', $inputUrl) || preg_match('/^data:/i', $inputUrl)) {
|
||||
return $fullMatch;
|
||||
}
|
||||
if ($inputFileRelativePathParts === $outputFileRelativePathParts) {
|
||||
@ -648,7 +648,7 @@ EOD;
|
||||
return str_replace($inputUrl, $outputUrl, $fullMatch);
|
||||
};
|
||||
|
||||
$cssContent = preg_replace_callback('/url\(["\']?([^)^"^\']*)["\']?\)/is', $callback, $cssContent);
|
||||
$cssContent = preg_replace_callback('/url\(["\']?([^)^"^\']*)["\']?\)/i', $callback, $cssContent);
|
||||
|
||||
return $cssContent;
|
||||
}
|
||||
|
Reference in New Issue
Block a user