From 3bb2c876482302ebeca5217d2f8dbd842a4af02c Mon Sep 17 00:00:00 2001 From: "John Molakvoæ (skjnldsv)" Date: Mon, 4 Mar 2019 11:21:57 +0100 Subject: Do not cut full color on accessibility svg color invert MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: John Molakvoæ (skjnldsv) --- apps/accessibility/lib/Controller/AccessibilityController.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'apps/accessibility') diff --git a/apps/accessibility/lib/Controller/AccessibilityController.php b/apps/accessibility/lib/Controller/AccessibilityController.php index 91c110de868..e17b206cdfd 100644 --- a/apps/accessibility/lib/Controller/AccessibilityController.php +++ b/apps/accessibility/lib/Controller/AccessibilityController.php @@ -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 + ) + ); } /** -- cgit v1.2.3