mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
Merge pull request #2375 from PhenomRetroShare/Fix_HandleRichText
Fix HandleRichText
This commit is contained in:
commit
2e1716c9e1
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user