encodeForLDAP

Encodes the given string for safe output in LDAP queries.

encodeForLDAP(string); → returns String

Argument Reference for the encodeForLDAP function

string

Required: Yes
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