mirror of https://github.com/M66B/FairEmail.git
Escape edit as plain text
This commit is contained in:
parent
dd9f7d408a
commit
02d3803c4c
|
@ -870,8 +870,11 @@ public class FragmentCompose extends FragmentBase {
|
|||
Document document = JsoupEx.parse(body);
|
||||
if (plain) {
|
||||
String text = HtmlHelper.getText(ref.outerHtml());
|
||||
String[] line = text.split("\\r?\\n");
|
||||
for (int i = 0; i < line.length; i++)
|
||||
line[i] = Html.escapeHtml(line[i]);
|
||||
Element p = document.createElement("p");
|
||||
p.html(text.replaceAll("\\r?\\n", "<br>"));
|
||||
p.html(TextUtils.join("<br>", line));
|
||||
document.body().appendChild(p);
|
||||
} else {
|
||||
Document d = HtmlHelper.sanitize(context, ref.outerHtml(), true, false);
|
||||
|
|
Loading…
Reference in New Issue