lib/ezutils/classes/ezsys.php
public static function escapeShellArgument( $argument )
    {
        $escapeChar = self::instance()->ShellEscapeCharacter;
        if ( $escapeChar == "'" )
        {
            $argument = str_replace( "'", "'\\''", $argument );
        }
        else
        {
            $argument = str_replace( $escapeChar, "\\" . $escapeChar, addcslashes( $argument, '\\' ) );
        }
        return $escapeChar . $argument . $escapeChar;
    }
public static function escapeShellArgument( $argument )
    {
        $escapeChar = self::instance()->ShellEscapeCharacter;
        if ( $escapeChar == "'" )
        {
            $argument = str_replace( "'", "'\\''", $argument );
        }
        else
        {
            $argument = str_replace( $escapeChar, "\\" . $escapeChar, addcslashes( $argument, '\\' ) );
        }
        return $escapeChar . $argument . $escapeChar;
    }
public static function escapeShellArgument ( $ argument ) { $ escapeChar = self :: instance ( ) -> ShellEscapeCharacter ; if ( $ escapeChar == "'" ) { $ argument = str_replace ( "'" , "'\\''" , $ argument ) ; } else { $ argument = str_replace ( $ escapeChar , "\\" . $ escapeChar , addcslashes ( $ argument , '\\' ) ) ; } return $ escapeChar . $ argument . $ escapeChar ; }
Returns an escaped string to be used as a shell argument

@param string $argument
@return string
Returns an escaped string to be used as a shell argument