function to get escaped lowered jid's