From fe6f6caa5f6c483c0552de27da7b318ea77ae2eb Mon Sep 17 00:00:00 2001 From: Philip Whitehouse Date: Sun, 8 Jan 2017 13:19:14 +0000 Subject: [PATCH] Rework where we wrap message content --- .../java/com/fsck/k9/ui/compose/QuotedMessageMvpView.java | 5 ++++- k9mail/src/main/java/com/fsck/k9/view/MessageWebView.java | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/k9mail/src/main/java/com/fsck/k9/ui/compose/QuotedMessageMvpView.java b/k9mail/src/main/java/com/fsck/k9/ui/compose/QuotedMessageMvpView.java index 4796a3f52..ac3e70a37 100644 --- a/k9mail/src/main/java/com/fsck/k9/ui/compose/QuotedMessageMvpView.java +++ b/k9mail/src/main/java/com/fsck/k9/ui/compose/QuotedMessageMvpView.java @@ -12,6 +12,7 @@ import android.widget.ImageButton; import com.fsck.k9.FontSizes; import com.fsck.k9.R; import com.fsck.k9.activity.MessageCompose; +import com.fsck.k9.helper.HtmlConverter; import com.fsck.k9.mailstore.AttachmentResolver; import com.fsck.k9.message.QuotedTextMode; import com.fsck.k9.message.SimpleMessageFormat; @@ -119,7 +120,9 @@ public class QuotedMessageMvpView { } public void setQuotedHtml(String quotedContent, AttachmentResolver attachmentResolver) { - mQuotedHTML.displayHtmlContentWithInlineAttachments(quotedContent, attachmentResolver, null); + mQuotedHTML.displayHtmlContentWithInlineAttachments( + HtmlConverter.wrapMessageContent(quotedContent), + attachmentResolver, null); } public void setQuotedText(String quotedText) { diff --git a/k9mail/src/main/java/com/fsck/k9/view/MessageWebView.java b/k9mail/src/main/java/com/fsck/k9/view/MessageWebView.java index ababb415d..0b09131a7 100644 --- a/k9mail/src/main/java/com/fsck/k9/view/MessageWebView.java +++ b/k9mail/src/main/java/com/fsck/k9/view/MessageWebView.java @@ -118,7 +118,7 @@ public class MessageWebView extends RigidWebView { public void displayHtmlContentWithInlineAttachments(@NonNull String htmlText, @Nullable AttachmentResolver attachmentResolver, @Nullable OnPageFinishedListener onPageFinishedListener) { setWebViewClient(attachmentResolver, onPageFinishedListener); - setHtmlContent(HtmlConverter.wrapMessageContent(htmlText)); + setHtmlContent(htmlText); } private void setWebViewClient(@Nullable AttachmentResolver attachmentResolver,