From 8aa0f0485df5238739e9c3436f7aefebba53e66f Mon Sep 17 00:00:00 2001 From: Julius Härtl Date: Thu, 26 Jul 2018 22:08:48 +0200 Subject: Fix regex for icon urls MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Use the version from the url rather than hardcoding v=1. Also allow uppercase chars in the url, so that uppercase hex color values will also be included Signed-off-by: Julius Härtl --- lib/private/Template/IconsCacher.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/private/Template/IconsCacher.php b/lib/private/Template/IconsCacher.php index e5ebecaf169..e5ea1b33815 100644 --- a/lib/private/Template/IconsCacher.php +++ b/lib/private/Template/IconsCacher.php @@ -47,7 +47,7 @@ class IconsCacher { protected $urlGenerator; /** @var string */ - private $iconVarRE = '/--(icon-[a-zA-Z0-9-]+): url\(["\']([a-z0-9-_\~\/\.]+)[^;]+;/m'; + private $iconVarRE = '/--(icon-[a-zA-Z0-9-]+): url\(["\']([a-zA-Z0-9-_\~\/\.\?\=]+)[^;]+;/m'; /** @var string */ private $fileName = 'icons-vars.css'; @@ -101,7 +101,7 @@ class IconsCacher { $data = ''; foreach ($icons as $icon => $url) { - $data .= "--$icon: url('$url?v=1');"; + $data .= "--$icon: url('$url');"; } if (strlen($data) > 0) { -- cgit v1.2.3