Do not cut full color on accessibility svg color invert

Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
This commit is contained in:
John Molakvoæ (skjnldsv) 2019-03-04 11:21:57 +01:00
parent c706009ced
commit 3bb2c87648
No known key found for this signature in database
GPG key ID: 60C25B8C072916CF

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
)
);
}
/**