From 45c5c8e61e0601d3111196f216d7a46b37c73bb2 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Sat, 24 May 2014 12:48:13 +0200 Subject: [PATCH] Fixed variables containing forward slashes breaking the LESS compiler --- .../files/lib/system/style/StyleCompiler.class.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/wcfsetup/install/files/lib/system/style/StyleCompiler.class.php b/wcfsetup/install/files/lib/system/style/StyleCompiler.class.php index 04a9a1ba64..c77c813f1b 100644 --- a/wcfsetup/install/files/lib/system/style/StyleCompiler.class.php +++ b/wcfsetup/install/files/lib/system/style/StyleCompiler.class.php @@ -191,6 +191,14 @@ class StyleCompiler extends SingletonFactory { * @param \wcf\system\Callback $callback */ protected function compileStylesheet($filename, array $files, array $variables, $individualLess, Callback $callback) { + // escape variable values containing a forward slash + foreach ($variables as &$value) { + if (strpos($value, '/') !== false) { + $value = '~"'.$value.'"'; + } + } + unset($value); + // add options as LESS variables if (PACKAGE_ID) { foreach (Option::getOptions() as $constantName => $option) { -- 2.20.1