From f350d0d93f0ce04c635a7bb5958c47c8800f4e2b Mon Sep 17 00:00:00 2001 From: Herbert Scheffknecht Date: Thu, 13 Aug 2020 15:58:04 +0200 Subject: [PATCH 1/3] Fixed issue with "url(""); ... any other css code .. url("arrow_12345.svg");" CSS code --- src/CSS.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/CSS.php b/src/CSS.php index 89fcf1bb..ad4440bd 100644 --- a/src/CSS.php +++ b/src/CSS.php @@ -248,7 +248,7 @@ protected function combineImports($source, $content, $parents) */ protected function importFiles($source, $content) { - $regex = '/url\((["\']?)(.+?)\\1\)/i'; + $regex = '/url\((["\']?)([^")]+?\\1\)/i'; if ($this->importExtensions && preg_match_all($regex, $content, $matches, PREG_SET_ORDER)) { $search = array(); $replace = array(); From d5050f816753408cd9e07c685888f134053fbefa Mon Sep 17 00:00:00 2001 From: Herbert Scheffknecht Date: Thu, 13 Aug 2020 16:13:03 +0200 Subject: [PATCH 2/3] Fixed issue with "url(""); ... any other css code .. url("arrow_12345.svg");" CSS code --- src/CSS.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/CSS.php b/src/CSS.php index ad4440bd..ab42e7f5 100644 --- a/src/CSS.php +++ b/src/CSS.php @@ -248,7 +248,7 @@ protected function combineImports($source, $content, $parents) */ protected function importFiles($source, $content) { - $regex = '/url\((["\']?)([^")]+?\\1\)/i'; + $regex = '/url\((["\']?)([^")]+?)\\1\)/i'; if ($this->importExtensions && preg_match_all($regex, $content, $matches, PREG_SET_ORDER)) { $search = array(); $replace = array(); From 5e2861b58222643dbf3bfb54a4ec5b91088fc3a9 Mon Sep 17 00:00:00 2001 From: Herbert Scheffknecht Date: Wed, 9 Mar 2022 21:16:48 +0100 Subject: [PATCH 3/3] Fixed regex --- src/CSS.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/CSS.php b/src/CSS.php index ab42e7f5..3aef619d 100644 --- a/src/CSS.php +++ b/src/CSS.php @@ -248,7 +248,7 @@ protected function combineImports($source, $content, $parents) */ protected function importFiles($source, $content) { - $regex = '/url\((["\']?)([^")]+?)\\1\)/i'; + $regex = '/url\((["\']?)([^"\']+?)\\1\)/i'; if ($this->importExtensions && preg_match_all($regex, $content, $matches, PREG_SET_ORDER)) { $search = array(); $replace = array();