diff options
author | Konstantinos Sideris <sideris.konstantin@gmail.com> | 2017-11-07 09:15:30 +0200 |
---|---|---|
committer | Konstantinos Sideris <sideris.konstantin@gmail.com> | 2017-11-07 09:15:30 +0200 |
commit | dc0ffc26dd5d0d7d274c1649201e1f99995b2ee8 (patch) | |
tree | 60389b122f2d99cc71943af6d9994b1f1b1b980f /src/TimelineItem.cc | |
parent | 24dd76ee0bca1a593781d366a41017f5b1d9ec07 (diff) | |
parent | 097dac4f7966759800d9a96c8a17d4008eae9d61 (diff) |
Merge remote-tracking branch 'ralith/fix-newlines'
Diffstat (limited to 'src/TimelineItem.cc')
-rw-r--r-- | src/TimelineItem.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/TimelineItem.cc b/src/TimelineItem.cc index bd778175..a99170b9 100644 --- a/src/TimelineItem.cc +++ b/src/TimelineItem.cc @@ -92,8 +92,8 @@ TimelineItem::TimelineItem(events::MessageEventType ty, } body = body.toHtmlEscaped(); - body.replace("\n", "<br/>"); body.replace(URL_REGEX, URL_HTML); + body.replace("\n", "<br/>"); generateTimestamp(timestamp); if (withSender) { @@ -199,12 +199,12 @@ TimelineItem::TimelineItem(const events::MessageEvent<msgs::Notice> &event, descriptiveTime(QDateTime::fromMSecsSinceEpoch(event.timestamp()))}; auto body = event.content().body().trimmed().toHtmlEscaped(); - body.replace("\n", "<br/>"); auto timestamp = QDateTime::fromMSecsSinceEpoch(event.timestamp()); generateTimestamp(timestamp); body.replace(URL_REGEX, URL_HTML); + body.replace("\n", "<br/>"); body = "<i style=\"color: #565E5E\">" + body + "</i>"; if (with_sender) { @@ -246,8 +246,8 @@ TimelineItem::TimelineItem(const events::MessageEvent<msgs::Emote> &event, generateTimestamp(timestamp); emoteMsg = emoteMsg.toHtmlEscaped(); - emoteMsg.replace("\n", "<br/>"); emoteMsg.replace(URL_REGEX, URL_HTML); + emoteMsg.replace("\n", "<br/>"); if (with_sender) { generateBody(displayName, emoteMsg); @@ -286,8 +286,8 @@ TimelineItem::TimelineItem(const events::MessageEvent<msgs::Text> &event, generateTimestamp(timestamp); body = body.toHtmlEscaped(); - body.replace("\n", "<br/>"); body.replace(URL_REGEX, URL_HTML); + body.replace("\n", "<br/>"); if (with_sender) { generateBody(displayName, body); |