Fixed rare crash

This commit is contained in:
M66B 2020-10-15 21:46:15 +02:00
parent 20a8a79a31
commit dc8726e513
1 changed files with 4 additions and 3 deletions

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();