2018-10-24 13:15:26 +00:00
|
|
|
#include "utils.h"
|
|
|
|
|
|
|
|
QString utils::removeReply(const QString& text) {
|
|
|
|
QString result(text);
|
2018-11-27 10:14:48 +00:00
|
|
|
result.remove(utils::removeRichReplyRegex);
|
|
|
|
result.remove(utils::removeReplyRegex);
|
|
|
|
return result;
|
2018-10-24 13:15:26 +00:00
|
|
|
}
|
2018-11-29 02:41:38 +00:00
|
|
|
|
|
|
|
QString utils::cleanHTML(const QString& text, QMatrixClient::Room* room) {
|
|
|
|
QString result(text);
|
|
|
|
result.replace(codePillRegExp, "<i>\\1</i>");
|
|
|
|
result.replace(userPillRegExp, "<b>\\1</b>");
|
|
|
|
return result;
|
|
|
|
}
|