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