2 # JID Escaping XEP-0106 for the xmpppy based transports written by Norman Rasmussen
4 """This file is the XEP-0106 commands.
6 Implemented commands as follows:
8 4.2 Encode : Encoding Transformation
9 4.3 Decode : Decoding Transformation
26 str = str.replace('\\5c', '\\5c5c')
27 for each
in xep0106mapping
:
28 str = str.replace('\\' + each
[1], '\\5c' + each
[1])
29 for each
in xep0106mapping
:
30 str = str.replace(each
[0], '\\' + each
[1])
34 for each
in xep0106mapping
:
35 str = str.replace('\\' + each
[1], each
[0])
36 return str.replace('\\5c', '\\')