Browse Source

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 <selva.nair@gmail.com>
pull/490/head
Selva Nair 3 years ago committed by Gert Doering
parent
commit
79f5cb91c6
  1. 4
      misc.c

4
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)
{

Loading…
Cancel
Save