Save signature, fixes

This commit is contained in:
M66B
2019-11-22 19:16:02 +01:00
parent 43f537f0cd
commit 29de070dec
5 changed files with 341 additions and 363 deletions

View File

@@ -86,10 +86,10 @@ public class HtmlHelper {
} catch (Throwable ex) {
// OutOfMemoryError
Log.e(ex);
Document document = new Document("");
Document document = Document.createShell("");
Element strong = document.createElement("strong");
strong.text(Helper.formatThrowable(ex));
document.appendChild(strong);
document.body().appendChild(strong);
return document;
}
}
@@ -476,6 +476,11 @@ public class HtmlHelper {
if (!TextUtils.isEmpty(span.attr("color")))
span.tagName("font");
if (document.body() == null) {
Log.e("Sanitize without body");
document.normalise();
}
return document;
}