diff --git a/parser/parser_misc.c b/parser/parser_misc.c index 870dfc7da..902455500 100644 --- a/parser/parser_misc.c +++ b/parser/parser_misc.c @@ -459,12 +459,13 @@ char *processunquoted(const char *string, int len) long c; if (*string == '\\' && len > 1 && (c = strn_escseq(&pos, "", len)) != -1) { - /* catch \\ or \134 and pass it through to be handled - * by the backend pcre conversion + /* catch \\ or \134 and other aare special chars and + * pass it through to be handled by the backend + * pcre conversion */ - if (c == '\\') { - *s++ = '\\'; + if (strchr("*?[]{}^,\\", c) != NULL) { *s++ = '\\'; + *s++ = c; } else *s++ = c; len -= pos - string;