diff options
author | Julius Härtl <jus@bitgrid.net> | 2018-07-26 22:08:48 +0200 |
---|---|---|
committer | Julius Härtl <jus@bitgrid.net> | 2018-07-26 22:08:48 +0200 |
commit | 8aa0f0485df5238739e9c3436f7aefebba53e66f (patch) | |
tree | b68b24e61271790b5b2be1a69546c200c0afde1e | |
parent | 6514bf1e18485bd5e94ea01c5e49ca2d74c3023b (diff) | |
download | nextcloud-server-8aa0f0485df5238739e9c3436f7aefebba53e66f.tar.gz nextcloud-server-8aa0f0485df5238739e9c3436f7aefebba53e66f.zip |
Fix regex for icon urls
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 <jus@bitgrid.net>
-rw-r--r-- | core/img/actions/star-dark.svg | 2 | ||||
-rw-r--r-- | lib/private/Template/IconsCacher.php | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/core/img/actions/star-dark.svg b/core/img/actions/star-dark.svg index 16a7ac53ba7..331f1676852 100644 --- a/core/img/actions/star-dark.svg +++ b/core/img/actions/star-dark.svg @@ -1 +1 @@ -<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 16 16" width="16" height="16"><path d="m8 0.5 2.2 5.3 5.8 0.45-4.5 3.75 1.5 5.5-5-3.1-5 3.1 1.5-5.5-4.5-3.75 5.8-0.45z"/></svg> +<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 16 16" width="16" height="16"><path d="m8 0.5 2.2 5.3 5.8 0.45-4.5 3.75 1.5 5.5-5-3.1-5 3.1 1.5-5.5-4.5-3.75 5.8-0.45z" fill="#000"/></svg> 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) { |