diff options
author | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2019-03-17 09:03:34 +0900 |
---|---|---|
committer | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2019-03-24 19:08:20 +0900 |
commit | e855085835909549aa866ed968e24902eb378b5a (patch) | |
tree | 975797a8b1515b22e7ffeba2e5f385dcf1212663 /lib/util.h | |
parent | 21e5138f6cf1e96d3cac702e2ada2a0148a3ec92 (diff) | |
download | libquotient-e855085835909549aa866ed968e24902eb378b5a.tar.gz libquotient-e855085835909549aa866ed968e24902eb378b5a.zip |
RoomMemberEvent: sanitize user display names
MemberEventContent::displayName() will strip away Unicode text direction override characters. Direct access to JSON can still provide "raw" data.
Diffstat (limited to 'lib/util.h')
-rw-r--r-- | lib/util.h | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -296,7 +296,12 @@ namespace QMatrixClient return std::make_pair(last, sLast); } - /** Pretty-prints plain text into HTML + /** Sanitize the text before showing in HTML + * This does toHtmlEscaped() and removes Unicode BiDi marks. + */ + QString sanitized(const QString& plainText); + + /** Pretty-print plain text into HTML * This includes HTML escaping of <,>,",& and URLs linkification. */ QString prettyPrint(const QString& plainText); |