Use LDAP String Escaper without a complicated workflow.
Escape LDAP filter and DN special characters for safer directory query text. This registration is prepared for a browser-side JavaScript UI, so no Python/API processing is required when the UI is implemented.