Sanitize on edit ref

pull/184/head
M66B 5 years ago
parent f52d3ccadf
commit 72827e45bb

@ -4257,7 +4257,7 @@ public class FragmentCompose extends FragmentBase {
Document d; Document d;
if (extras != null && extras.containsKey("html")) { if (extras != null && extras.containsKey("html")) {
// Save current revision // Save current revision
Document c = JsoupEx.parse(body); Document c = HtmlHelper.sanitizeCompose(context, body, true);
for (Element e : ref) for (Element e : ref)
c.body().appendChild(e); c.body().appendChild(e);
@ -4266,7 +4266,7 @@ public class FragmentCompose extends FragmentBase {
Helper.writeText(draft.getFile(context, draft.revision), c.html()); Helper.writeText(draft.getFile(context, draft.revision), c.html());
d = JsoupEx.parse(extras.getString("html")); d = HtmlHelper.sanitizeCompose(context, extras.getString("html"), true);
} else { } else {
d = HtmlHelper.sanitizeCompose(context, body, true); d = HtmlHelper.sanitizeCompose(context, body, true);

Loading…
Cancel
Save