diff --git a/src/Munee/Asset/Type/Image.php b/src/Munee/Asset/Type/Image.php index 251cfde..db32735 100644 --- a/src/Munee/Asset/Type/Image.php +++ b/src/Munee/Asset/Type/Image.php @@ -192,7 +192,8 @@ protected function parsePlaceholders($file) foreach ($this->options['placeholders'] as $path => $placeholder) { // Setup path for regex - $regex = '^' . $this->request->webroot . str_replace(array('*', $this->request->webroot), array('.*?', ''), $path) . '$'; + $escapedWebroot = preg_quote($this->request->webroot); + $regex = '^' . $escapedWebroot . str_replace(array('*', $this->request->webroot), array('.*?', ''), $path) . '$'; if (preg_match("%{$regex}%", $file)) { if ('http' == substr($placeholder, 0, 4)) { $ret = $this->getImageByUrl($placeholder);