- QString awayMessage(tr("(unknown)"));
- if(!_ircUser->awayMessage().isEmpty()) {
- awayMessage = _ircUser->awayMessage();
+ QString awayMessageHTML = QString("<p class='italic'>%1</p>").arg(tr("Unknown"));
+
+ // If away message is known, replace with the escaped message.
+ if (!_ircUser->awayMessage().isEmpty()) {
+ awayMessageHTML = NetworkItem::escapeHTML(_ircUser->awayMessage());