mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-07-23 06:31:20 -04:00
Merge pull request #2375 from PhenomRetroShare/Fix_HandleRichText
Fix HandleRichText
This commit is contained in:
commit
2e1716c9e1
1 changed files with 5 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue