|
|
@ -1371,15 +1371,15 @@ public class HtmlHelper {
|
|
|
|
|
|
|
|
|
|
|
|
// Build list of allowed hosts
|
|
|
|
// Build list of allowed hosts
|
|
|
|
List<String> hosts = new ArrayList<>();
|
|
|
|
List<String> hosts = new ArrayList<>();
|
|
|
|
for (Element img : document.select("img")) {
|
|
|
|
//for (Element img : document.select("img")) {
|
|
|
|
String src = img.attr("src");
|
|
|
|
// String src = img.attr("src");
|
|
|
|
if (!TextUtils.isEmpty(src) && !isTrackingPixel(img)) {
|
|
|
|
// if (!TextUtils.isEmpty(src) && !isTrackingPixel(img)) {
|
|
|
|
Uri uri = Uri.parse(img.attr("src"));
|
|
|
|
// Uri uri = Uri.parse(img.attr("src"));
|
|
|
|
String host = uri.getHost();
|
|
|
|
// String host = uri.getHost();
|
|
|
|
if (host != null && !hosts.contains(host))
|
|
|
|
// if (host != null && !hosts.contains(host))
|
|
|
|
hosts.add(host);
|
|
|
|
// hosts.add(host);
|
|
|
|
}
|
|
|
|
// }
|
|
|
|
}
|
|
|
|
//}
|
|
|
|
|
|
|
|
|
|
|
|
// Images
|
|
|
|
// Images
|
|
|
|
for (Element img : document.select("img")) {
|
|
|
|
for (Element img : document.select("img")) {
|
|
|
|