From 7ce813513818e58d3d35116c868bd6c8d866c997 Mon Sep 17 00:00:00 2001 From: nicm Date: Thu, 29 Aug 2019 07:13:48 +0000 Subject: It is not longer necessary to double-escape ; in %%%, problem reported by Theo Buehler. --- cmd.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'cmd.c') diff --git a/cmd.c b/cmd.c index c838c53f..bbcd7744 100644 --- a/cmd.c +++ b/cmd.c @@ -661,7 +661,7 @@ char * cmd_template_replace(const char *template, const char *s, int idx) { char ch, *buf; - const char *ptr, *cp, quote[] = "\"\\$"; + const char *ptr, *cp, quote[] = "\"\\$;"; int replaced, quoted; size_t len; @@ -692,10 +692,6 @@ cmd_template_replace(const char *template, const char *s, int idx) for (cp = s; *cp != '\0'; cp++) { if (quoted && strchr(quote, *cp) != NULL) buf[len++] = '\\'; - if (quoted && *cp == ';') { - buf[len++] = '\\'; - buf[len++] = '\\'; - } buf[len++] = *cp; } buf[len] = '\0'; -- cgit v1.2.3