Debug: styles

pull/212/head
M66B 2 years ago
parent dc169a1120
commit 276cd473d3

@ -6959,6 +6959,11 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
element.attr("x-computed", computed);
}
if (BuildConfig.DEBUG) {
d = HtmlHelper.sanitizeView(context, d, false);
d.outputSettings().prettyPrint(true).outline(true).indentAmount(1);
}
File dir = Helper.ensureExists(new File(context.getFilesDir(), "shared"));
File share = new File(dir, message.id + ".txt");
Helper.writeText(share, d.html());

@ -567,6 +567,8 @@ public class HtmlHelper {
safelist.addTags("center").addAttributes(":all", "align");
if (!view)
safelist.addProtocols("img", "src", "content");
if (BuildConfig.DEBUG)
safelist.addAttributes(":all", "x-computed");
final Document document = new Cleaner(safelist).clean(parsed);

Loading…
Cancel
Save