Escape single quotes inside double quote.

Signed-off-by: Bruno Pena <brunompena@gmail.com>
This commit is contained in:
Bruno Pena 2018-02-27 23:18:57 +01:00
parent ad8063166e
commit 4401f60d91
1 changed files with 2 additions and 0 deletions

View File

@ -88,6 +88,8 @@ char *get_arg(char **text)
case 4: /* Backslash */ case 4: /* Backslash */
if (*end == '\\') if (*end == '\\')
*(rewrite++) = '\\'; *(rewrite++) = '\\';
else if (*end == '\'')
*(rewrite++) = '\'';
else if (*end == 'n') else if (*end == 'n')
*(rewrite++) = '\n'; *(rewrite++) = '\n';
else if (*end == 'r') else if (*end == 'r')