mirror of
https://github.com/M66B/FairEmail.git
synced 2024-12-25 17:27:00 +00:00
Suppress title if same as img alt
This commit is contained in:
parent
ba186235e0
commit
905d56038d
1 changed files with 6 additions and 2 deletions
|
@ -1037,8 +1037,12 @@ public class HtmlHelper {
|
|||
if (text_titles)
|
||||
for (Element e : document.select("[title]")) {
|
||||
String title = e.attr("title");
|
||||
if (!TextUtils.isEmpty(title))
|
||||
e.prependChild(document.createElement("span").text("{" + title + "}"));
|
||||
if (TextUtils.isEmpty(title))
|
||||
continue;
|
||||
if ("img".equals(e.tagName()) &&
|
||||
title.equals(e.attr("alt")))
|
||||
continue;
|
||||
e.prependChild(document.createElement("span").text("{" + title + "}"));
|
||||
}
|
||||
|
||||
// Replace headings
|
||||
|
|
Loading…
Reference in a new issue