Skip to content
Snippets Groups Projects
Commit 78a00025 authored by Dennis's avatar Dennis
Browse files

Merge branch 'eliminate-arrows' into 'master'

Eliminate arrows

See merge request chat/RocketChatMobileEngine!95
parents 6db3c70b 3f787920
No related branches found
No related tags found
1 merge request!95Eliminate arrows
......@@ -144,8 +144,9 @@ QSharedPointer<RocketChatMessage> MessageService::parseMessage( const QJsonObjec
msgString = Utils::linkiFy( msgString );
msgString = msgString.replace( QStringLiteral( "\n" ), QStringLiteral( "<br>" ) );
msgString = Utils::escapeHtml(msgString);
msgString = Utils::emojiFy( msgString, mEmojiRepo );
}
QString msgType;
......
......@@ -314,6 +314,14 @@ QString Utils::emojiFy( const QString &pMessage, EmojiRepo *pEmojiRepo )
return returnText;
}
QString Utils::escapeHtml(const QString &pText)
{
QString buff = pText;
buff.replace("<--","←");
buff.replace("-->","→");
return buff;
}
qint16 Utils::hash( const QStringList &pStrings )
{
QByteArray stringSum;
......
......@@ -35,6 +35,7 @@ class Utils
static QString removeUtf8Emojis( const QString &pText );
static QString linkiFy( const QString &pText );
static QString emojiFy( const QString &pText, EmojiRepo *pEmojiRepo );
static QString escapeHtml( const QString &pText);
static double getMessageTimestamp( const QJsonObject &pMessage );
static bool compareMessageTimestamps( const QJsonObject &pMessage1, const QJsonObject &pMessage2 );
static bool messageHasTimestamp( const QJsonObject &pMessage );
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment