Revert r63213, r63214 per CR comment on r63214, doesn't match documented cmd.exe...
authorTim Starling <tstarling@users.mediawiki.org>
Fri, 9 Jul 2010 06:54:14 +0000 (06:54 +0000)
committerTim Starling <tstarling@users.mediawiki.org>
Fri, 9 Jul 2010 06:54:14 +0000 (06:54 +0000)
includes/GlobalFunctions.php

index 132519c..bd9bc0f 100644 (file)
@@ -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 {