From 7adda3bf704a1a2c86fabadaf5fbcb33f24c6bea Mon Sep 17 00:00:00 2001 From: Tim Starling Date: Fri, 9 Jul 2010 06:54:14 +0000 Subject: [PATCH] Revert r63213, r63214 per CR comment on r63214, doesn't match documented cmd.exe behaviour --- includes/GlobalFunctions.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) 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 { -- 2.20.1