@classmethod
def escape_parameters(cls, parameters):
    """
        Escapes the parameters of a TS3 query and encodes it as a part
        of a valid ts3 query string.

        >>> # None
        >>> TS3Escape.escape_parameters(None)
        ''        
        >>> # key -> str
        >>> TS3Escape.escape_parameters({'virtualserver_name': 'foo bar'})
        'virtualserver_name=foo\\\\sbar'
        >>> # key -> None
        >>> TS3Escape.escape_parameters({"permsid": None})
        ''
        >>> # Of course, you can mix them:
        >>> TS3Escape.escape_parameters(
        ...     {'virtualserver_name': 'foo bar',
        ...      'permsid': None}
        ...     )
        'virtualserver_name=foo\\\\sbar'

        :arg parameters: The dictionary with the key value pairs.
        :type parameters: dictionary
        """
    if parameters is None:
        return str()
    tmp = list()
    for key, val in parameters.items():
        if val is None:
            continue
        key = key.lower()
        val = cls.escape(val)
        if key:
            tmp.append(key + '=' + val)
        else:
            tmp.append(val)
    tmp = ' '.join(tmp)
    return tmp
