From 7550389c72433acc071ae101bc813c86f9670abb Mon Sep 17 00:00:00 2001 From: spycrab Date: Thu, 10 May 2018 19:19:09 +0200 Subject: [PATCH] Qt/NetPlayDialog: Escape HTML in chat --- Source/Core/DolphinQt2/NetPlay/NetPlayDialog.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Source/Core/DolphinQt2/NetPlay/NetPlayDialog.cpp b/Source/Core/DolphinQt2/NetPlay/NetPlayDialog.cpp index 4e6d1d7681..c8e48d14ab 100644 --- a/Source/Core/DolphinQt2/NetPlay/NetPlayDialog.cpp +++ b/Source/Core/DolphinQt2/NetPlay/NetPlayDialog.cpp @@ -201,8 +201,8 @@ void NetPlayDialog::OnChat() Settings::Instance().GetNetPlayClient()->SendChatMessage(msg); m_chat_type_edit->clear(); - DisplayMessage(QStringLiteral("%1: %2").arg(QString::fromStdString(m_nickname), - QString::fromStdString(msg)), + DisplayMessage(QStringLiteral("%1: %2").arg(QString::fromStdString(m_nickname).toHtmlEscaped(), + QString::fromStdString(msg).toHtmlEscaped()), "blue"); }); } @@ -439,7 +439,7 @@ void NetPlayDialog::DisplayMessage(const QString& msg, const std::string& color, void NetPlayDialog::AppendChat(const std::string& msg) { - DisplayMessage(QString::fromStdString(msg), ""); + DisplayMessage(QString::fromStdString(msg).toHtmlEscaped(), ""); } void NetPlayDialog::OnMsgChangeGame(const std::string& title)