html-escape nicknames
authorsheepluva
Sat, 29 Oct 2011 17:52:35 +0200
changeset 6233 b81199041d8f
parent 6231 810b9ced2b67
child 6235 bb1a657f751b
html-escape nicknames
QTfrontend/ui/widget/chatwidget.cpp
--- a/QTfrontend/ui/widget/chatwidget.cpp	Sat Oct 29 16:54:46 2011 +0200
+++ b/QTfrontend/ui/widget/chatwidget.cpp	Sat Oct 29 17:52:35 2011 +0200
@@ -502,9 +502,10 @@
 {
     if (nickname != m_userNick)
         return QString("<a href=\"hwnick://?%1\" class=\"nick\">%2</a>").arg(
-                    QString(nickname.toUtf8().toBase64())).arg(nickname);
-    else
-        return QString("<span class=\"nick\">%1</span>").arg(nickname);
+               QString(nickname.toUtf8().toBase64())).arg(Qt::escape(nickname));
+
+    // unlinked nick (if own one)
+    return QString("<span class=\"nick\">%1</span>").arg(Qt::escape(nickname));
 }