On 6/27/07, Tomasz Sterna <[EMAIL PROTECTED]> wrote:
Dnia 27-06-2007, śro o godzinie 15:03 +0400, Sergei Golovan napisał(a):
> You're right. And the question is: "How to escape it? Can escaping be
> done unambiguously?"

Yes. You have a node, domain and resource which you need to escape
before concatenating them into JID.

I didn't see any XMPP client, which requires to enter node and server
separately in send message dialogs (I did see clients which asks for
chatroom names).



> 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.

Well... You shouldn't show such a monstrosity to a user.
Use the JID parts wisely. Show username, domain eventually resource.

In general, I can show unescaped JID. But what's the idea of XEP-0106 then?



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

It's an invalid entry and you should return an error to the user.
You've asked for a JID and the text entered isn't a valid JID.
There is no way of telling which part is what without some external
information.

Unfortunately, it means that to be able to send message to such a
strange JID the user has to khow how to escape it. Should users read
XEPs? :)

--
Sergei Golovan

Reply via email to