aboutsummaryrefslogtreecommitdiff
path: root/room.h
diff options
context:
space:
mode:
authorKitsune Ral <Kitsune-Ral@users.sf.net>2018-01-18 08:51:29 +0900
committerKitsune Ral <Kitsune-Ral@users.sf.net>2018-01-18 08:51:29 +0900
commit0221eb08bc7b0a58a110cc7a942159afa755aeec (patch)
tree5de1f9bd1b977f9995133deb00229328f0a36488 /room.h
parentbbb207277a1f8ca1deb69116f20523fcedf05c64 (diff)
downloadlibquotient-0221eb08bc7b0a58a110cc7a942159afa755aeec.tar.gz
libquotient-0221eb08bc7b0a58a110cc7a942159afa755aeec.zip
Move links pretty-printing code from Quaternion to lib
This code is useful for all clients, and extensions to pretty-printing can be later added either via making prettyPrint() virtual or even by providing a registry of additional "text transformers" or even "event content renderers" applied to visualise the event.
Diffstat (limited to 'room.h')
-rw-r--r--room.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/room.h b/room.h
index f5bf0839..ac540fea 100644
--- a/room.h
+++ b/room.h
@@ -192,6 +192,11 @@ namespace QMatrixClient
Q_INVOKABLE FileTransferInfo fileTransferInfo(const QString& id) const;
+ /** Pretty-prints plain text into HTML
+ * This includes HTML escaping of <,>,",& and URLs linkification.
+ */
+ QString prettyPrint(const QString& plainText) const;
+
MemberSorter memberSorter() const;
QJsonObject toJson() const;