From c0153a1636006ce98939be4ae72761721faca004 Mon Sep 17 00:00:00 2001 From: cketti Date: Mon, 27 Aug 2012 17:38:10 +0200 Subject: [PATCH] Display decrypted/verified messages like text/plain messages Nicely format the text instead of wrapping it in
 tags.
---
 src/com/fsck/k9/view/SingleMessageView.java | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/src/com/fsck/k9/view/SingleMessageView.java b/src/com/fsck/k9/view/SingleMessageView.java
index 71a191c8e..aa8b29984 100644
--- a/src/com/fsck/k9/view/SingleMessageView.java
+++ b/src/com/fsck/k9/view/SingleMessageView.java
@@ -38,6 +38,7 @@ import com.fsck.k9.crypto.CryptoProvider;
 import com.fsck.k9.crypto.PgpData;
 import com.fsck.k9.helper.ClipboardManager;
 import com.fsck.k9.helper.Contacts;
+import com.fsck.k9.helper.HtmlConverter;
 import com.fsck.k9.helper.Utility;
 import com.fsck.k9.mail.*;
 import com.fsck.k9.mail.internet.MimeUtility;
@@ -533,11 +534,12 @@ public class SingleMessageView extends LinearLayout implements OnClickListener,
         String text = null;
         if (pgpData != null) {
             text = pgpData.getDecryptedData();
+            if (text != null) {
+                text = HtmlConverter.textToHtml(text, true);
+            }
         }
-        if (text != null) {
-            text = "
" + text + "
"; - } else { - // getTextForDisplay() always returns HTML-ified content. + + if (text == null) { text = message.getTextForDisplay(); }