From 72827e45bbf28c13107d79d5a47eb4f88d67ce65 Mon Sep 17 00:00:00 2001 From: M66B Date: Thu, 20 Aug 2020 19:27:34 +0200 Subject: [PATCH] Sanitize on edit ref --- app/src/main/java/eu/faircode/email/FragmentCompose.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/FragmentCompose.java b/app/src/main/java/eu/faircode/email/FragmentCompose.java index 13ad894be2..e27ec39213 100644 --- a/app/src/main/java/eu/faircode/email/FragmentCompose.java +++ b/app/src/main/java/eu/faircode/email/FragmentCompose.java @@ -4257,7 +4257,7 @@ public class FragmentCompose extends FragmentBase { Document d; if (extras != null && extras.containsKey("html")) { // Save current revision - Document c = JsoupEx.parse(body); + Document c = HtmlHelper.sanitizeCompose(context, body, true); for (Element e : ref) c.body().appendChild(e); @@ -4266,7 +4266,7 @@ public class FragmentCompose extends FragmentBase { Helper.writeText(draft.getFile(context, draft.revision), c.html()); - d = JsoupEx.parse(extras.getString("html")); + d = HtmlHelper.sanitizeCompose(context, extras.getString("html"), true); } else { d = HtmlHelper.sanitizeCompose(context, body, true);