escape.patch
src/client/networkmodel.cpp | ||
---|---|---|
21 | 21 |
#include "networkmodel.h" |
22 | 22 | |
23 | 23 |
#include <QAbstractItemView> |
24 |
#include <QTextDocument> // for Qt::escape() |
|
24 | 25 | |
25 | 26 |
#include "buffermodel.h" |
26 | 27 |
#include "client.h" |
... | ... | |
191 | 192 |
QString NetworkItem::toolTip(int column) const { |
192 | 193 |
Q_UNUSED(column); |
193 | 194 | |
194 |
QStringList toolTip(QString("<b>%1</b>").arg(networkName()));
|
|
195 |
toolTip.append(tr("Server: %1").arg(currentServer()));
|
|
195 |
QStringList toolTip(QString("<b>%1</b>").arg(Qt::escape(networkName())));
|
|
196 |
toolTip.append(tr("Server: %1").arg(Qt::escape(currentServer())));
|
|
196 | 197 |
toolTip.append(tr("Users: %1").arg(nickCount())); |
197 | 198 | |
198 | 199 |
if(_network) { |
... | ... | |
479 | 480 |
Q_UNUSED(column); |
480 | 481 |
QStringList toolTip; |
481 | 482 | |
482 |
toolTip.append(tr("<b>Channel %1</b>").arg(bufferName()));
|
|
483 |
toolTip.append(tr("<b>Channel %1</b>").arg(Qt::escape(bufferName())));
|
|
483 | 484 |
if(isActive()) { |
484 | 485 |
//TODO: add channel modes |
485 | 486 |
toolTip.append(tr("<b>Users:</b> %1").arg(nickCount())); |
... | ... | |
495 | 496 |
QString _topic = topic(); |
496 | 497 |
if(_topic != "") { |
497 | 498 |
_topic = stripFormatCodes(_topic); |
498 |
_topic.replace(QString("<"), QString("<")); |
|
499 |
_topic.replace(QString(">"), QString(">")); |
|
499 |
_topic = Qt::escape(_topic); |
|
500 | 500 |
toolTip.append(QString("<font size='-2'> </font>")); |
501 | 501 |
toolTip.append(tr("<b>Topic:</b> %1").arg(_topic)); |
502 | 502 |
} |