From 70f23caa9a18afc146f696fdf7d2481e5f7f0101 Mon Sep 17 00:00:00 2001 From: sergio Date: Mon, 6 Dec 2021 11:53:50 +0300 Subject: [PATCH] fix #4697, adds backslashes quotation for exec (#4699) Signed-off-by: Sergio E. Nemirowski --- i3-dmenu-desktop | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/i3-dmenu-desktop b/i3-dmenu-desktop index 09670f652..e43d95aaf 100755 --- a/i3-dmenu-desktop +++ b/i3-dmenu-desktop @@ -482,7 +482,8 @@ EOT # double quote which is NOT preceded by a backslash (\). # # Therefore, we escape all double quotes (") by replacing them with \" - $exec =~ s/"/\\"/g; + $exec =~ s/\\"/\\\\\\"/g; + $exec =~ s/([^\\])"/$1\\"/g; if (exists($app->{StartupNotify}) && !$app->{StartupNotify}) { $nosn = '--no-startup-id';