Html: refactoring

pull/214/head
M66B 9 months ago
parent 5cd8f50965
commit 1c5ba52048

@ -351,9 +351,9 @@ public class ActivityCode extends ActivityBase {
if (sanitize) {
List<CSSStyleSheet> sheets =
HtmlHelper.parseStyles(d.head().select("style"));
HtmlSanitize.parseStyles(d.head().select("style"));
for (Element element : d.select("*")) {
String computed = HtmlHelper.processStyles(context,
String computed = HtmlSanitize.processStyles(context,
element.tagName(),
element.className(),
element.attr("style"),

@ -5924,11 +5924,11 @@ public class FragmentCompose extends FragmentBase {
Element e = d.body();
// Apply styles
List<CSSStyleSheet> sheets = HtmlHelper.parseStyles(d.head().select("style"));
List<CSSStyleSheet> sheets = HtmlSanitize.parseStyles(d.head().select("style"));
for (Element element : e.select("*")) {
String tag = element.tagName();
String clazz = element.attr("class");
String style = HtmlHelper.processStyles(context, tag, clazz, null, sheets);
String style = HtmlSanitize.processStyles(context, tag, clazz, null, sheets);
style = HtmlHelper.mergeStyles(style, element.attr("style"));
if (!TextUtils.isEmpty(style))
element.attr("style", style);

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save