Commit 8571151a authored by Daniel Henninger's avatar Daniel Henninger Committed by dhenninger

[GATE-176] Handling HTML entities better.

git-svn-id: http://svn.igniterealtime.org/svn/repos/wildfire/trunk/src/plugins/gateway@7275 b35dd754-fafc-0310-a699-88a17e54d16e
parent 3a3792b9
......@@ -32,6 +32,7 @@ import java.util.Arrays;
import java.util.List;
import org.jivesoftware.util.Log;
import org.jivesoftware.util.StringUtils;
import org.jivesoftware.wildfire.gateway.TransportLoginStatus;
import org.xmpp.packet.Presence;
......@@ -141,7 +142,7 @@ public class BOSConnection extends BasicFlapConnection {
String sn = String.valueOf(omic.getFromUIN());
//String msg = "Offline message sent at "+new Date(omic.getDate().getTime()).toString()+"\n"+OscarTools.stripHtml(omic.getContents()).trim();
String msg = "Offline message received:\n"+OscarTools.stripHtml(omic.getContents()).trim();
String msg = "Offline message received:\n"+ StringUtils.unescapeFromXML(OscarTools.stripHtml(omic.getContents()).trim());
oscarSession.getTransport().sendMessage(
oscarSession.getJIDWithHighestPriority(),
......
......@@ -19,6 +19,7 @@ import java.util.concurrent.ConcurrentHashMap;
import org.jivesoftware.util.Log;
import org.jivesoftware.util.LocaleUtils;
import org.jivesoftware.util.StringUtils;
import org.xmpp.packet.Message;
import org.xmpp.packet.Presence;
import org.xmpp.packet.JID;
......@@ -103,7 +104,7 @@ public abstract class BasicFlapConnection extends BaseFlapConnection {
String sn = icbm.getSenderInfo().getScreenname();
InstantMessage message = icbm.getMessage();
String msg = OscarTools.stripHtml(message.getMessage());
String msg = StringUtils.unescapeFromXML(OscarTools.stripHtml(message.getMessage()));
oscarSession.getTransport().sendMessage(
oscarSession.getJIDWithHighestPriority(),
......
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