}
switch (str[x]) {
+#ifndef PHP_WIN32
case '"':
case '\'':
-#ifndef PHP_WIN32
if (!p && (p = memchr(str + x + 1, str[x], l - x - 1))) {
/* noop */
} else if (p && *p == str[x]) {
cmd[y++] = str[x];
break;
#else
- /* This is Windows specific for enviromental variables */
+ /* % is Windows specific for enviromental variables, ^%PATH% will
+ output PATH whil ^%PATH^% not. escapeshellcmd will escape all %.
+ */
case '%':
- cmd[y++] = ' ';
- break;
+ case '"':
+ case '\'':
#endif
case '#': /* This is character-set independent */
case '&':