diff options
| author | spycrab <spycrab@users.noreply.github.com> | 2019-04-02 23:23:38 +0200 |
|---|---|---|
| committer | spycrab <spycrab@users.noreply.github.com> | 2019-04-02 23:23:38 +0200 |
| commit | 628d72c67d03dd8d229111c7802414e55569e1d3 (patch) | |
| tree | a12e944d3f17a4bd8b592817d0febf85516c48b5 /Source/Core/DolphinQt/NetPlay/NetPlayDialog.cpp | |
| parent | 8e1fb126d711f7dcecbf16725d35b06cdc8f18b9 (diff) | |
Qt/NetPlayDialog: Fix messages being html-escaped for NetPlay Chat
Diffstat (limited to 'Source/Core/DolphinQt/NetPlay/NetPlayDialog.cpp')
| -rw-r--r-- | Source/Core/DolphinQt/NetPlay/NetPlayDialog.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Source/Core/DolphinQt/NetPlay/NetPlayDialog.cpp b/Source/Core/DolphinQt/NetPlay/NetPlayDialog.cpp index 49c0c8310c..52ba81937a 100644 --- a/Source/Core/DolphinQt/NetPlay/NetPlayDialog.cpp +++ b/Source/Core/DolphinQt/NetPlay/NetPlayDialog.cpp @@ -361,9 +361,9 @@ void NetPlayDialog::SendMessage(const std::string& msg) { Settings::Instance().GetNetPlayClient()->SendChatMessage(msg); - DisplayMessage(QStringLiteral("%1: %2").arg(QString::fromStdString(m_nickname).toHtmlEscaped(), - QString::fromStdString(msg).toHtmlEscaped()), - ""); + DisplayMessage( + QStringLiteral("%1: %2").arg(QString::fromStdString(m_nickname), QString::fromStdString(msg)), + ""); } void NetPlayDialog::OnChat() @@ -768,8 +768,8 @@ void NetPlayDialog::Update() void NetPlayDialog::DisplayMessage(const QString& msg, const std::string& color, int duration) { QueueOnObject(m_chat_edit, [this, color, msg] { - m_chat_edit->append( - QStringLiteral("<font color='%1'>%2</font>").arg(QString::fromStdString(color), msg)); + m_chat_edit->append(QStringLiteral("<font color='%1'>%2</font>") + .arg(QString::fromStdString(color), msg.toHtmlEscaped())); }); QColor c(color.empty() ? QStringLiteral("white") : QString::fromStdString(color)); @@ -782,7 +782,7 @@ void NetPlayDialog::DisplayMessage(const QString& msg, const std::string& color, void NetPlayDialog::AppendChat(const std::string& msg) { - DisplayMessage(QString::fromStdString(msg).toHtmlEscaped(), ""); + DisplayMessage(QString::fromStdString(msg), ""); QApplication::alert(this); } |
