From 79f5cb91c68308cbaa8bd0ef7d45da63e2f4dfc6 Mon Sep 17 00:00:00 2001 From: Selva Nair Date: Wed, 30 Mar 2022 21:55:48 -0400 Subject: [PATCH] Do not escape single quote character Commit 6271d2f67 added escaping of single quote in quoted strings which is wrong. Fix it. Signed-off-by: Selva Nair --- misc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/misc.c b/misc.c index e2620fa..cc213ae 100644 --- a/misc.c +++ b/misc.c @@ -162,7 +162,7 @@ out: } /** - * Escape \ space ' and " in a string + * Escape backslash, space and double-quote in a string * @param input Pointer to the string to escape * @returns A newly allocated string containing the result or NULL * on error. Caller must free it after use. @@ -171,7 +171,7 @@ char * escape_string(const char *input) { char *out = strdup(input); - const char *esc = "\'\"\\ "; + const char *esc = "\"\\ "; if (!out) {