VersionPress\Utils\ProcessUtils::escapeshellargWindows PHP Method

escapeshellargWindows() private static method

Windows shell escaping from Drush:
private static escapeshellargWindows ( $arg ) : mixed | string
$arg
return mixed | string
    private static function escapeshellargWindows($arg)
    {
        // Double up existing backslashes
        $arg = preg_replace('/\\\\/', '\\\\\\\\', $arg);
        // Double up double quotes
        $arg = preg_replace('/"/', '""', $arg);
        // Double up percents.
        $arg = preg_replace('/%/', '%%', $arg);
        // Add surrounding quotes.
        $arg = '"' . $arg . '"';
        return $arg;
    }