[jdev] Escaping JID using XEP-0106

Sergei Golovan sgolovan at nes.ru
Wed Jun 27 06:03:18 CDT 2007

On 6/27/07, Tomasz Sterna <tomek at xiaoka.com> wrote:
> Dnia 27-06-2007, śro o godzinie 12:53 +0400, Sergei Golovan napisał(a):
> > Could someone clarify how to escape the following JID (and to split it
> > into node, server and resource)?
> >
> > user at jabber.org/user at jabber.org/resource
> This is not a JID.
> (in other words: this is invalid JID)
> There is no way of telling which part is a node, domain, resource.
> You need to escape it FIRST (using XEP-0106) to be a valid JID before
> trying to parse/split it.

You're right. And the question is: "How to escape it? Can escaping be
done unambiguously?"

The problem is that if I get alredy escaped JID
user\40jabber.org\2fuser at jabber.org/resource then I can unescape it
and show to a user as user at jabber.org/user at jabber.org/resource.

But what to do if a user enters such a JID into a client entry box and
wants to send a message to it?

Best wishes!
Sergei Golovan

More information about the JDev mailing list