mirror of
https://github.com/M66B/FairEmail.git
synced 2025-02-24 07:01:05 +00:00
parent
9bee7d85f6
commit
c7b7fee232
2 changed files with 5 additions and 3 deletions
|
@ -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 = HtmlHelper.sanitizeCompose(context, body, true);
|
Document c = JsoupEx.parse(body);
|
||||||
|
|
||||||
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 = HtmlHelper.sanitizeCompose(context, extras.getString("html"), true);
|
d = JsoupEx.parse(extras.getString("html"));
|
||||||
} else {
|
} else {
|
||||||
d = HtmlHelper.sanitizeCompose(context, body, true);
|
d = HtmlHelper.sanitizeCompose(context, body, true);
|
||||||
|
|
||||||
|
|
|
@ -257,7 +257,7 @@ public class HtmlEx {
|
||||||
isInBulletList = null;
|
isInBulletList = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
String tagType = isBulletListItem != null ? "li" : "p";
|
String tagType = isBulletListItem != null ? "li" : "span";
|
||||||
out.append("<").append(tagType)
|
out.append("<").append(tagType)
|
||||||
.append(getTextDirection(text, i, next))
|
.append(getTextDirection(text, i, next))
|
||||||
.append(getTextStyles(text, i, next, isBulletListItem == null, true))
|
.append(getTextStyles(text, i, next, isBulletListItem == null, true))
|
||||||
|
@ -268,6 +268,8 @@ public class HtmlEx {
|
||||||
out.append("</");
|
out.append("</");
|
||||||
out.append(tagType);
|
out.append(tagType);
|
||||||
out.append(">\n");
|
out.append(">\n");
|
||||||
|
if (isBulletListItem == null)
|
||||||
|
out.append("<br>\n");
|
||||||
|
|
||||||
if (next == end && isInBulletList != null) {
|
if (next == end && isInBulletList != null) {
|
||||||
out.append(isInBulletList ? "</ul>\n" : "</ol>\n");
|
out.append(isInBulletList ? "</ul>\n" : "</ol>\n");
|
||||||
|
|
Loading…
Reference in a new issue