def _escape_filterargs(self, filterargs):
if isinstance(filterargs, tuple):<EOL><INDENT>filterargs = tuple(self.ldap.filter.escape_filter_chars(value)<EOL>for value in filterargs)<EOL><DEDENT>elif isinstance(filterargs, dict):<EOL><INDENT>filterargs = dict((key, self.ldap.filter.escape_filter_chars(value))<EOL>for key, value in filterargs.items())<EOL><DEDENT>else:<EOL><INDENT>raise TypeError("<STR_LIT>")<EOL><DEDENT>return filterargs<EOL>
Escapes values in filterargs.

filterargs is a value suitable for Django's string formatting operator
(%), which means it's either a tuple or a dict. This return a new tuple
or dict with all values escaped for use in filter strings.