diff options
Diffstat (limited to 'core/Controller/SvgController.php')
-rw-r--r-- | core/Controller/SvgController.php | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/core/Controller/SvgController.php b/core/Controller/SvgController.php index 1fad9c39c3b..f0fc1dac4d4 100644 --- a/core/Controller/SvgController.php +++ b/core/Controller/SvgController.php @@ -91,7 +91,7 @@ class SvgController extends Controller { $appRootPath = $this->appManager->getAppPath($app); $appPath = substr($appRootPath, strlen($this->serverRoot)); - + if (!$appPath) { return new NotFoundResponse(); } @@ -119,8 +119,7 @@ class SvgController extends Controller { } // add fill (fill is not present on black elements) - $fillRe = '/<((circle|rect|path)((?!fill)[a-z0-9 =".\-#():;])+)\/>/mi'; - + $fillRe = '/<((circle|rect|path)((!fill)[a-z0-9 =".\-#():;])+)\/>/mi'; $svg = preg_replace($fillRe, '<$1 fill="#' . $color . '"/>', $svg); // replace any fill or stroke colors |