Merge pull request #14499 from nextcloud/fix/svg-api/dark-mode

Do not cut full color on accessibility svg color invert
This commit is contained in:
Morris Jobke 2019-03-04 17:39:24 +01:00 committed by GitHub
commit 36b7fc7bef
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -260,7 +260,15 @@ class AccessibilityController extends Controller {
* @return string
*/
private function invertSvgIconsColor(string $css) {
return str_replace(['color=000', 'color=fff', 'color=***'], ['color=***', 'color=000', 'color=fff'], $css);
return str_replace(
['color=000&', 'color=fff&', 'color=***&'],
['color=***&', 'color=000&', 'color=fff&'],
str_replace(
['color=000000&', 'color=ffffff&', 'color=******&'],
['color=******&', 'color=000000&', 'color=ffffff&'],
$css
)
);
}
/**