mirror of
https://github.com/M66B/FairEmail.git
synced 2026-04-04 16:16:33 +02:00
Use canonical URL
This commit is contained in:
@@ -477,6 +477,14 @@ public class ContactInfo {
|
||||
|
||||
Document doc = JsoupEx.parse(response);
|
||||
|
||||
// <link rel="canonical" href="" />
|
||||
Element canonical = doc.head().select("link[rel=canonical]").first();
|
||||
if (canonical != null) {
|
||||
String href = canonical.attr("href");
|
||||
if (!TextUtils.isEmpty(href))
|
||||
base = new URL(href);
|
||||
}
|
||||
|
||||
List<Future<Bitmap>> futures = new ArrayList<>();
|
||||
|
||||
for (Element link : doc.head().select("link[href~=.*\\.(ico|png|gif|svg)]")) {
|
||||
|
||||
Reference in New Issue
Block a user