i3-dmenu-desktop: also quote the %c field code (Thanks bo)

The spec says:

“Implementations must take care not to expand field codes into multiple
 arguments unless explicitly instructed by this specification. This means
 that name fields, filenames and other replacements that can contain
 spaces must be passed as a single argument to the executable program
 after expansion.”

fixes #1240
This commit is contained in:
Michael Stapelberg 2014-04-26 14:25:12 +02:00
parent 87c855f851
commit a0e979d097

View File

@ -376,6 +376,7 @@ sub quote {
$choice = quote($choice); $choice = quote($choice);
$location = quote($location); $location = quote($location);
$name = quote($name);
# Remove deprecated field codes, as the spec dictates. # Remove deprecated field codes, as the spec dictates.
$exec =~ s/%[dDnNvm]//g; $exec =~ s/%[dDnNvm]//g;