1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2024-12-25 01:06:04 +00:00

Fixed rare crash

This commit is contained in:
M66B 2020-10-15 21:46:15 +02:00
parent 20a8a79a31
commit dc8726e513

View file

@ -298,7 +298,7 @@ public class HtmlHelper {
Log.e(ex);
Document document = Document.createShell("");
Element strong = document.createElement("strong");
strong.text(Log.formatThrowable(ex));
strong.text(android.util.Log.getStackTraceString(ex));
document.body().appendChild(strong);
return document;
}
@ -312,7 +312,7 @@ public class HtmlHelper {
Log.e(ex);
Document document = Document.createShell("");
Element strong = document.createElement("strong");
strong.text(Log.formatThrowable(ex));
strong.text(android.util.Log.getStackTraceString(ex));
document.body().appendChild(strong);
return document;
}
@ -389,7 +389,8 @@ public class HtmlHelper {
if (tag.contains(":")) {
if (display_hidden ||
ns == null || tag.startsWith(ns)) {
e.tagName(tag.split(":")[1]);
String[] nstag = tag.split(":");
e.tagName(nstag[nstag.length > 1 ? 1 : 0]);
Log.i("Updated tag=" + tag + " to=" + e.tagName());
} else {
e.remove();