aboutsummaryrefslogtreecommitdiff
path: root/lib/util.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/util.cpp')
-rw-r--r--lib/util.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/util.cpp b/lib/util.cpp
index c3e21c8e..0248e521 100644
--- a/lib/util.cpp
+++ b/lib/util.cpp
@@ -74,12 +74,11 @@ QString QMatrixClient::sanitized(const QString& plainText)
QString QMatrixClient::prettyPrint(const QString& plainText)
{
- auto pt = QStringLiteral("<span style='white-space:pre-wrap'>") +
- plainText.toHtmlEscaped() + QStringLiteral("</span>");
- pt.replace('\n', QStringLiteral("<br/>"));
-
+ auto pt = plainText.toHtmlEscaped();
linkifyUrls(pt);
- return pt;
+ pt.replace('\n', QStringLiteral("<br/>"));
+ return QStringLiteral("<span style='white-space:pre-wrap'>") + pt
+ + QStringLiteral("</span>");
}
QString QMatrixClient::cacheLocation(const QString& dirName)