Make sure LDAP filter strings are properly escaped.  This is a better approach.