Escapes a value for safe interpolation into an RFC 4515 filter string.
Replaces the assertion-value metacharacters -- \, *, (, ), and the NUL byte -- with
their \xx hex escapes (\5c, \2a, \28, \29, \00). Use this only when building a
filter string by hand; the structured builders (eq, contains, ...) are
already injection-safe and must not be combined with this (it would double-escape).
Parameters
value: string
The raw assertion value.
Returns string
The escaped value, safe to splice between an operator and a ).
Escapes a value for safe interpolation into an RFC 4515 filter string.
Replaces the assertion-value metacharacters --
\,*,(,), and the NUL byte -- with their\xxhex escapes (\5c,\2a,\28,\29,\00). Use this only when building a filter string by hand; the structured builders (eq, contains, ...) are already injection-safe and must not be combined with this (it would double-escape).