npub1j4vzvddca62l5s3n644dj94akr8ucalyf9rq4v0rgrd77fncytzq20z8hn (npub1j4v…z8hn) I tried that. But the problem is that then the escaped values will be stored in the DB. And when I need to use these values I have *possibly* escaped values that I have to pass to LDAP. And I have no way of determining whether the values are escaped or not.
And unescaping everything before storing can break perfectly valid strings that by chance contain escape-sequences. Tried all of that already and didn't come to a good solution.