Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorslewis2008-09-12 17:06:00 -0400
committerslewis2008-09-12 17:06:00 -0400
commit9315fed372ac6c7234ba8f3d82e1bd3ee3db0828 (patch)
tree28dcde205ce3e382deb2ff02b7f88d62eb9700af /providers/bundles/org.eclipse.ecf.provider.xmpp
parent5e66bfb64a04a4717133f25f63d13bb60e5e1e90 (diff)
downloadorg.eclipse.ecf-9315fed372ac6c7234ba8f3d82e1bd3ee3db0828.tar.gz
org.eclipse.ecf-9315fed372ac6c7234ba8f3d82e1bd3ee3db0828.tar.xz
org.eclipse.ecf-9315fed372ac6c7234ba8f3d82e1bd3ee3db0828.zip
additional fixes for escape char output
Diffstat (limited to 'providers/bundles/org.eclipse.ecf.provider.xmpp')
-rw-r--r--providers/bundles/org.eclipse.ecf.provider.xmpp/src/org/eclipse/ecf/internal/provider/xmpp/XMPPContainerPresenceHelper.java7
-rw-r--r--providers/bundles/org.eclipse.ecf.provider.xmpp/src/org/eclipse/ecf/provider/xmpp/identity/XMPPID.java2
2 files changed, 5 insertions, 4 deletions
diff --git a/providers/bundles/org.eclipse.ecf.provider.xmpp/src/org/eclipse/ecf/internal/provider/xmpp/XMPPContainerPresenceHelper.java b/providers/bundles/org.eclipse.ecf.provider.xmpp/src/org/eclipse/ecf/internal/provider/xmpp/XMPPContainerPresenceHelper.java
index dc87825a2..b3a8aa12d 100644
--- a/providers/bundles/org.eclipse.ecf.provider.xmpp/src/org/eclipse/ecf/internal/provider/xmpp/XMPPContainerPresenceHelper.java
+++ b/providers/bundles/org.eclipse.ecf.provider.xmpp/src/org/eclipse/ecf/internal/provider/xmpp/XMPPContainerPresenceHelper.java
@@ -370,13 +370,13 @@ public class XMPPContainerPresenceHelper implements ISharedObject {
protected IRosterEntry createRosterEntry(RosterEntry entry) {
final XMPPID xmppid = createIDFromName(entry.getUser());
- final String name = (entry.getName() == null) ? xmppid.getUsername() : entry.getName();
+ final String name = (entry.getName() == null) ? xmppid.getUsername() : XMPPID.unfixEscapeInNode(entry.getName());
return createRosterEntry(xmppid, name, entry.getGroups());
}
protected IRosterEntry createRosterEntry(RosterPacket.Item entry) {
final XMPPID xmppid = createIDFromName(entry.getUser());
- final String name = (entry.getName() == null) ? xmppid.getUsername() : entry.getName();
+ final String name = (entry.getName() == null) ? xmppid.getUsername() : XMPPID.unfixEscapeInNode(entry.getName());
return createRosterEntry(xmppid, name, entry.getGroupNames());
}
@@ -791,7 +791,7 @@ public class XMPPContainerPresenceHelper implements ISharedObject {
protected IRosterItem[] createRosterEntries(RosterEntry entry) {
final XMPPID xmppid = createIDFromName(entry.getUser());
final String name = entry.getName();
- final User newUser = (name == null) ? new User(xmppid, xmppid.getUsername()) : new User(xmppid, name);
+ final User newUser = (name == null) ? new User(xmppid, xmppid.getUsername()) : new User(xmppid, XMPPID.unfixEscapeInNode(name));
return createRosterEntries(entry.getGroups(), roster, newUser);
}
@@ -884,6 +884,7 @@ public class XMPPContainerPresenceHelper implements ISharedObject {
String name = entry.getName();
if (name == null)
name = id.getUsername();
+ name = XMPPID.unfixEscapeInNode(name);
return createRosterEntries(entry.getGroupNames(), roster, new User(id, name));
}
diff --git a/providers/bundles/org.eclipse.ecf.provider.xmpp/src/org/eclipse/ecf/provider/xmpp/identity/XMPPID.java b/providers/bundles/org.eclipse.ecf.provider.xmpp/src/org/eclipse/ecf/provider/xmpp/identity/XMPPID.java
index 3ad26fe90..3c8ac290c 100644
--- a/providers/bundles/org.eclipse.ecf.provider.xmpp/src/org/eclipse/ecf/provider/xmpp/identity/XMPPID.java
+++ b/providers/bundles/org.eclipse.ecf.provider.xmpp/src/org/eclipse/ecf/provider/xmpp/identity/XMPPID.java
@@ -78,7 +78,7 @@ public class XMPPID extends BaseID implements IChatID, IFQID {
return src.replaceAll("%", "%25");
}
- static String unfixEscapeInNode(String node) {
+ public static String unfixEscapeInNode(String node) {
if (node == null)
return null;
for (final Iterator i = escapeTable.keySet().iterator(); i.hasNext();) {

Back to the top