[Standards] JID Escaping

Michal 'vorner' Vaner vorner at ucw.cz
Fri Jul 20 13:01:58 UTC 2007


On Fri, Jul 20, 2007 at 02:41:32PM +0200, Mats Bengtsson wrote:
> >> But then the XEP is wrong since it includes the "/" character to be > 
> >> escaped.
> > No its not, it is specifying escaping of the node portion of the JID, it 
> > specifically says you must not escape the resource.
>  It is since you cannot uniquely separate the JID into its 
>  node+domain+resource parts.
>  You cannot tell which the node part is. In my example
>  User JID: mats at home.se/coci at home.se/mats at home.se/coci

Once again: if this _is_ a JID, you do no escaping. Then mats is node,
home.se is server and the rest is resource.

JID escaping is when you want to have some "odd" thing in the node part
and you know what is node. So if user enters:

name: some at stupid/crazy at thing
server: some.server

then you can not send it this way. So you need to escape the name
somehow to make it JID.

>  the node part may be: mats\40home.se\2fcoci\40home.se\2fmats
>  The problem is escaping both the "@" and "/" and be able to uniquely 
>  identify the
>  node+domain+resource parts of a JID. I think you can allow to escape either 
>  of these characters but not both.

You can escape whatever you want. But you need to know the parts before
as parts. You escape it so you get a valid JID where you can see what is
what when it is written together.

When eating an elephant take one bite at a time.
		-- Gen. C. Abrams

Michal 'vorner' Vaner
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://mail.jabber.org/pipermail/standards/attachments/20070720/9b083f40/attachment.sig>

More information about the Standards mailing list