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. > 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. > 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. -- Tomasz Sterna Xiaoka Grp. http://www.xiaoka.com/