mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2024-11-27 00:32:07 +01:00
Escape on setting JID instead of getting JID.
git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@5382 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
parent
41a5399c39
commit
edd7df6799
1 changed files with 6 additions and 4 deletions
|
@ -112,7 +112,7 @@ public abstract class Packet {
|
|||
* value has not been set.
|
||||
*/
|
||||
public String getTo() {
|
||||
return StringUtils.escapeJID(to);
|
||||
return to;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -122,7 +122,8 @@ public abstract class Packet {
|
|||
* @param to who the packet is being sent to.
|
||||
*/
|
||||
public void setTo(String to) {
|
||||
this.to = to;
|
||||
// Use escaped version of the JID in case the user included invalid characters.
|
||||
this.to = StringUtils.escapeJID(to);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -134,7 +135,7 @@ public abstract class Packet {
|
|||
* valud has not been set.
|
||||
*/
|
||||
public String getFrom() {
|
||||
return StringUtils.escapeJID(from);
|
||||
return from;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -145,7 +146,8 @@ public abstract class Packet {
|
|||
* @param from who the packet is being sent to.
|
||||
*/
|
||||
public void setFrom(String from) {
|
||||
this.from = from;
|
||||
// Use escaped version of the JID in case the user included invalid characters.
|
||||
this.from = StringUtils.escapeJID(from);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue