mirror of
https://github.com/M66B/FairEmail.git
synced 2025-02-23 14:41:08 +00:00
Sanitize (external) drafts
This commit is contained in:
parent
ec7ea93642
commit
7b183675c3
1 changed files with 6 additions and 1 deletions
|
@ -2368,7 +2368,12 @@ public class FragmentCompose extends FragmentBase {
|
|||
|
||||
EntityOperation.queue(context, data.draft, EntityOperation.ADD);
|
||||
} else {
|
||||
if (!data.draft.content) {
|
||||
if (data.draft.content) {
|
||||
File file = data.draft.getFile(context);
|
||||
String html = Helper.readText(file);
|
||||
html = HtmlHelper.sanitize(context, html, true);
|
||||
Helper.writeText(file, html);
|
||||
} else {
|
||||
if (data.draft.uid == null)
|
||||
throw new IllegalStateException("Draft without uid");
|
||||
EntityOperation.queue(context, data.draft, EntityOperation.BODY);
|
||||
|
|
Loading…
Reference in a new issue