1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00
This commit is contained in:
apprb 2014-12-11 21:33:38 +06:00
parent 5cb1b6fe8e
commit 13306031e2
No known key found for this signature in database
GPG Key ID: B001911B5B22FB9B

View File

@ -25,7 +25,7 @@ QTextBlockFormat ChatAction::nameFormat, ChatAction::dateFormat;
QString ChatAction::toHtmlChars(const QString &str) QString ChatAction::toHtmlChars(const QString &str)
{ {
static QList<QPair<QString, QString>> replaceList = {{"&","&amp;"}, {">","&gt;"}, {"<","&lt;"}}; static QList<QPair<QString, QString>> replaceList = {{"&","&amp;"}, {">","&gt;"}, {"<","&lt;"}, {" ", "&nbsp;"}}; // {"&","&amp;"} should be always first
QString res = str; QString res = str;
for (auto &it : replaceList) for (auto &it : replaceList)