On 6/27/07, Tomasz Sterna <[EMAIL PROTECTED]> 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)?
>
> [EMAIL PROTECTED]/[EMAIL PROTECTED]/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
[EMAIL PROTECTED]/resource then I can unescape it
and show to a user as [EMAIL PROTECTED]/[EMAIL PROTECTED]/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

Reply via email to