diff --git a/app/src/main/java/eu/faircode/email/FragmentDialogInsertLink.java b/app/src/main/java/eu/faircode/email/FragmentDialogInsertLink.java index 5555e85633..34bb48d641 100644 --- a/app/src/main/java/eu/faircode/email/FragmentDialogInsertLink.java +++ b/app/src/main/java/eu/faircode/email/FragmentDialogInsertLink.java @@ -160,10 +160,6 @@ public class FragmentDialogInsertLink extends FragmentDialogBase { if (title != null && !TextUtils.isEmpty(title.text())) return title.text(); - Element description = doc.select("meta[name=description]").first(); - if (description != null && !TextUtils.isEmpty(description.attr("content"))) - return description.attr("content"); - Element ogTitle = doc.select("meta[property=og:title]").first(); if (ogTitle != null && !TextUtils.isEmpty(ogTitle.attr("content"))) return ogTitle.attr("content"); @@ -172,6 +168,10 @@ public class FragmentDialogInsertLink extends FragmentDialogBase { if (twitterTitle != null && !TextUtils.isEmpty(twitterTitle.attr("content"))) return twitterTitle.attr("content"); + Element description = doc.select("meta[name=description]").first(); + if (description != null && !TextUtils.isEmpty(description.attr("content"))) + return description.attr("content"); + return null; } finally { connection.disconnect();