Skip to content

Commit

Permalink
Do not escape single quote character
Browse files Browse the repository at this point in the history
Commit 6271d2f added escaping of single quote in
quoted strings which is wrong. Fix it.

Signed-off-by: Selva Nair <[email protected]>
  • Loading branch information
selvanair authored and cron2 committed Apr 4, 2022
1 parent 2cc5788 commit 79f5cb9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions misc.c
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ GetDlgItemTextUtf8(HWND hDlg, int id, LPSTR *str, int *len)
}

/**
* 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.
Expand All @@ -171,7 +171,7 @@ char *
escape_string(const char *input)
{
char *out = strdup(input);
const char *esc = "\'\"\\ ";
const char *esc = "\"\\ ";

if (!out)
{
Expand Down

0 comments on commit 79f5cb9

Please sign in to comment.