Permalink
Browse files

updated for version 7.4.233

Problem:    Escaping special characters for using "%" with a shell command is
            inconsistant, parenthesis are escaped but spaces are not.
Solution:   Only escape "!". (Gary Johnson)
  • Loading branch information...
brammool committed Apr 1, 2014
1 parent fd3fe98 commit 31b7d38611541030fe54898a7d8b6a714fa0fa59
Showing with 4 additions and 12 deletions.
  1. +2 −12 src/ex_docmd.c
  2. +2 −0 src/version.c
View
@@ -4580,25 +4580,15 @@ expand_filename(eap, cmdlinep, errormsgp)
/* For a shell command a '!' must be escaped. */
if ((eap->usefilter || eap->cmdidx == CMD_bang)
&& vim_strpbrk(repl, (char_u *)"!&;()<>") != NULL)
&& vim_strpbrk(repl, (char_u *)"!") != NULL)
{
char_u *l;
l = vim_strsave_escaped(repl, (char_u *)"!&;()<>");
l = vim_strsave_escaped(repl, (char_u *)"!");
if (l != NULL)
{
vim_free(repl);
repl = l;
/* For a sh-like shell escape "!" another time. */
if (strstr((char *)p_sh, "sh") != NULL)
{
l = vim_strsave_escaped(repl, (char_u *)"!");
if (l != NULL)
{
vim_free(repl);
repl = l;
}
}
}
}
View
@@ -734,6 +734,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
233,
/**/
232,
/**/

0 comments on commit 31b7d38

Please sign in to comment.