Merge pull request #2375 from PhenomRetroShare/Fix_HandleRichText

Fix HandleRichText
This commit is contained in:
defnax 2021-03-13 14:16:00 +01:00 committed by GitHub
commit 2e1716c9e1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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);