encodeForLDAP

Encodes the given string for safe output in LDAP queries.

encodeForLDAP(string); → returns String

encodeForLDAP Argument Reference

string
Required

String to encode.

Compatibility

ColdFusion:

Version 11+ Works on CF 11+ but not documented.

Examples sample code invoking the encodeForLDAP function


Script Syntax

encodeForLDAP("pete) (| (password = * ) )")

Expected Result: pete\29 \28| \28password = \2a \29 \29


Fork me on GitHub