# HG changeset patch # User Jacob Dawid # Date 1311006561 -7200 # Node ID bc87c8da3efba3c7e229007b0eb16f8e269dd443 # Parent 9d7b0043fa4b17696849247d99b54b986fcae152 < and > get replaced, so it is no longer possible to use HTML tags in the IRC client. diff --git a/gui/src/IRCWidget.cpp b/gui/src/IRCWidget.cpp --- a/gui/src/IRCWidget.cpp +++ b/gui/src/IRCWidget.cpp @@ -160,6 +160,8 @@ { Q_UNUSED (destination); QString msg (message); + msg.replace ("<", "<"); + msg.replace (">", ">"); if (msg.contains (m_ircClient->nickInUse ())) { msg = @@ -189,8 +191,11 @@ IRCWidget::showTopic (const char *nick, const char *channel, const char *message) { + QString msg (message); + msg.replace ("<", "<"); + msg.replace (">", ">"); m_chatWindow->append (QString ("Topic for %2 was set by %1: %3").arg (nick). - arg (channel).arg (message)); + arg (channel).arg (msg)); } void @@ -275,8 +280,10 @@ else { m_ircClient->sendPublicMessage (message); + message.replace ("<", "<"); + message.replace (">", ">"); m_chatWindow->append (QString ("%1: %2"). - arg (m_ircClient->nickInUse ()).arg (message)); + arg (m_ircClient->nickInUse ()).arg (message)); } } diff --git a/gui/src/qirc/IRCClient.cpp b/gui/src/qirc/IRCClient.cpp --- a/gui/src/qirc/IRCClient.cpp +++ b/gui/src/qirc/IRCClient.cpp @@ -284,7 +284,7 @@ IRCClient::sendPublicMessage (QString message) { sendCommand (2, COMMAND_PRIVMSG, m_recentChannel.toStdString ().c_str (), - message.toStdString ().c_str ()); + message.toStdString ().c_str ()); } void