Commit b8f67ca2 authored by Daniel Henninger's avatar Daniel Henninger Committed by dhenninger

[GATE-132] Replaced @ -> % conversion with JID escaping.

git-svn-id: http://svn.igniterealtime.org/svn/repos/wildfire/trunk/src/plugins/gateway@6219 b35dd754-fafc-0310-a699-88a17e54d16e
parent f0c31186
...@@ -742,7 +742,7 @@ public abstract class BaseTransport implements Component, RosterEventListener { ...@@ -742,7 +742,7 @@ public abstract class BaseTransport implements Component, RosterEventListener {
* @return The legacy username as a JID. * @return The legacy username as a JID.
*/ */
public JID convertIDToJID(String username) { public JID convertIDToJID(String username) {
return new JID(username.replace('@', '%').replace(" ", ""), this.jid.getDomain(), null); return new JID(JID.escapeNode(username), this.jid.getDomain(), null);
} }
/** /**
...@@ -752,7 +752,7 @@ public abstract class BaseTransport implements Component, RosterEventListener { ...@@ -752,7 +752,7 @@ public abstract class BaseTransport implements Component, RosterEventListener {
* @return THe legacy username as a String. * @return THe legacy username as a String.
*/ */
public String convertJIDToID(JID jid) { public String convertJIDToID(JID jid) {
return jid.getNode().replace('%', '@'); return JID.unescapeNode(jid.getNode());
} }
/** /**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment