mirror of
https://github.com/M66B/FairEmail.git
synced 2025-02-22 14:11:00 +00:00
Use canonical URL
This commit is contained in:
parent
6daad8ed45
commit
31f4985bee
1 changed files with 8 additions and 0 deletions
|
@ -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)]")) {
|
||||
|
|
Loading…
Reference in a new issue