escape info message arguments, fixes issue 801: Frontend parses INFO command output as html
authorsheepluva
Sun, 01 Jun 2014 15:26:03 +0200
changeset 10252 814e137625f7
parent 10251 a3b42e81803c
child 10253 ea57f2f2b98d
escape info message arguments, fixes issue #801: Frontend parses INFO command output as html
QTfrontend/ui/widget/chatwidget.cpp
--- a/QTfrontend/ui/widget/chatwidget.cpp	Sun Jun 01 04:17:27 2014 +0200
+++ b/QTfrontend/ui/widget/chatwidget.cpp	Sun Jun 01 15:26:03 2014 +0200
@@ -593,9 +593,10 @@
 {
     addLine("msg_PlayerInfo", QString(" >>> %1 - <span class=\"ipaddress\">%2</span> <span class=\"version\">%3</span> <span class=\"location\">%4</span>")
         .arg(linkedNick(nick))
-        .arg(ip == "[]"?"":ip)
-        .arg(version)
-        .arg(roomInfo));
+        .arg(Qt::escape(ip == "[]"?"":ip))
+        .arg(Qt::escape(version))
+        .arg(Qt::escape(roomInfo))
+    );
 }
 
 void HWChatWidget::onKick()