From: Tim Starling Date: Fri, 9 Jul 2010 06:54:14 +0000 (+0000) Subject: Revert r63213, r63214 per CR comment on r63214, doesn't match documented cmd.exe... X-Git-Tag: 1.31.0-rc.0~36198 X-Git-Url: http://git.cyclocoop.org/fichier?a=commitdiff_plain;h=7adda3bf704a1a2c86fabadaf5fbcb33f24c6bea;p=lhc%2Fweb%2Fwiklou.git Revert r63213, r63214 per CR comment on r63214, doesn't match documented cmd.exe behaviour --- diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php index 132519c40b..bd9bc0f6cf 100644 --- a/includes/GlobalFunctions.php +++ b/includes/GlobalFunctions.php @@ -1424,17 +1424,13 @@ function wfEscapeShellArg( ) { } $delim = !$delim; } - // Double the backslashes before the end of the string, because // we will soon add a quote $m = array(); if ( preg_match( '/^(.*?)(\\\\+)$/', $arg, $m ) ) { $arg = $m[1] . str_replace( '\\', '\\\\', $m[2] ); } - - // The caret is also an special character - $arg = str_replace( "^", "^^", $arg ); - + // Add surrounding quotes $retVal .= '"' . $arg . '"'; } else {