From 21105cac17c13459ea3d81ba6c82fe5e9aad6514 Mon Sep 17 00:00:00 2001 From: Phenom Date: Sat, 13 Mar 2021 11:51:06 +0100 Subject: [PATCH] Fix HandleRichText --- retroshare-gui/src/util/HandleRichText.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/retroshare-gui/src/util/HandleRichText.cpp b/retroshare-gui/src/util/HandleRichText.cpp index dd33495b9..409d37aa6 100644 --- a/retroshare-gui/src/util/HandleRichText.cpp +++ b/retroshare-gui/src/util/HandleRichText.cpp @@ -623,7 +623,11 @@ QString RsHtml::formatText(QTextDocument *textDocument, const QString &text, ulo // convert text with QTextDocument QTextDocument textDoc; - textDoc.setPlainText(text); + if (Qt::mightBeRichText(formattedText)) + textDoc.setHtml(formattedText); + else + textDoc.setPlainText(text); + formattedText=textDoc.toHtml(); formattedText.remove(0,formattedText.indexOf("<")); formattedText=saveSpace(formattedText);