[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: Bad search filter with parenthesis?



Hi Darren,

On Wednesday 27 August 2003 23:25, Darren Gamble wrote:
> I'm running into problems with trying to put parenthesis into a search
> filter.
>
> Using 2.1.22 on Red Hat 9, and using this demonstration filter:
>
> (testattr=this(that))
>
> I get back "Bad search filter".

You need to quote the parentheses that should be part of the value
using the "backslash-hex" method described in the RFCs 
[i.e. ( -> \28, ) -> \29]
The same quoting mechanism applies to * and \ and ASCII NUL (0x00).
It does not hurt to have it applied to the ASCII control characters in the 
range 0x01 - 0x1F as well.

So your filter should look like
	(testattr=this\28that\29)

Peter

-- 
Peter Marschall
eMail: peter@adpm.de