Small improvement

This commit is contained in:
M66B 2019-10-19 10:19:05 +02:00
parent 6e29e09de5
commit 8db7b8fdda
1 changed files with 9 additions and 11 deletions

View File

@ -356,19 +356,17 @@ public class HtmlHelper {
String src = img.attr("src");
String tracking = img.attr("tracking");
if (!show_images) {
if (!TextUtils.isEmpty(alt)) {
if (!show_images && !TextUtils.isEmpty(alt))
if (TextUtils.isEmpty(tracking))
img.appendText(" " + alt + " ");
else {
img.append(" ");
if (TextUtils.isEmpty(tracking))
img.appendText(alt);
else {
Element a = document.createElement("a");
a.attr("href", tracking);
a.text(alt);
img.appendChild(a);
}
Element a = document.createElement("a");
a.attr("href", tracking);
a.text(alt);
img.appendChild(a);
img.appendText(" ");
}
}
// Annotate source with width and height
if (!TextUtils.isEmpty(src)) {