--- a/QTfrontend/newnetclient.cpp Tue Jan 06 11:28:13 2009 +0000
+++ b/QTfrontend/newnetclient.cpp Tue Jan 06 11:30:50 2009 +0000
@@ -19,6 +19,7 @@
#include <QMessageBox>
#include <QDebug>
+#include <QTextDocument>
#include "hwconsts.h"
#include "newnetclient.h"
@@ -278,9 +279,9 @@
QStringList tmp = lst;
tmp.removeFirst();
if (netClientState == 2)
- emit chatStringLobby(tmp.join("\n"));
+ emit chatStringLobby(Qt::escape(tmp.join("\n")));
else
- emit chatStringFromNet(tmp.join("\n"));
+ emit chatStringFromNet(Qt::escape(tmp.join("\n")));
return;
}
@@ -647,9 +648,9 @@
QString HWNewNet::formatChatMsg(const QString & nick, const QString & msg)
{
if(msg.left(4) == "/me ")
- return QString("* %1 %2").arg(nick).arg(msg.mid(4));
+ return QString("* %1 %2").arg(Qt::escape(nick)).arg(Qt::escape(msg.mid(4)));
else
- return QString("%1: %2").arg(nick).arg(msg);
+ return QString("%1: %2").arg(Qt::escape(nick)).arg(Qt::escape(msg));
}
void HWNewNet::kickPlayer(const QString & nick)