From 0221eb08bc7b0a58a110cc7a942159afa755aeec Mon Sep 17 00:00:00 2001 From: Kitsune Ral Date: Thu, 18 Jan 2018 08:51:29 +0900 Subject: 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. --- room.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'room.h') 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; -- cgit v1.2.3