mirror of https://github.com/M66B/FairEmail.git
Check for CSS styles
This commit is contained in:
parent
c7fd8f1f12
commit
1ed45c4d1c
|
@ -2588,6 +2588,27 @@ public class HtmlHelper {
|
||||||
if (node instanceof Element) {
|
if (node instanceof Element) {
|
||||||
Element e = (Element) node;
|
Element e = (Element) node;
|
||||||
|
|
||||||
|
String style = e.attr("style");
|
||||||
|
if (!TextUtils.isEmpty(style)) {
|
||||||
|
String[] params = style.split(";");
|
||||||
|
for (String param : params) {
|
||||||
|
int colon = param.indexOf(':');
|
||||||
|
if (colon <= 0)
|
||||||
|
continue;
|
||||||
|
String key = param.substring(0, colon).trim();
|
||||||
|
if ("color".equalsIgnoreCase(key) ||
|
||||||
|
"background-color".equalsIgnoreCase(key) ||
|
||||||
|
"font-family".equalsIgnoreCase(key) ||
|
||||||
|
"font-size".equalsIgnoreCase(key) ||
|
||||||
|
"text-align".equalsIgnoreCase(key) ||
|
||||||
|
"text-decoration".equalsIgnoreCase(key) /* line-through */) {
|
||||||
|
Log.i("Style element=" + node + " style=" + style);
|
||||||
|
result.value = true;
|
||||||
|
return FilterResult.STOP;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (STRUCTURE.contains(e.tagName()))
|
if (STRUCTURE.contains(e.tagName()))
|
||||||
return FilterResult.CONTINUE;
|
return FilterResult.CONTINUE;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue