OF-779: Escape LDAP principal name for JID

Applied patch provided by StanK.