mirror of
https://github.com/M66B/FairEmail.git
synced 2026-04-05 08:33:37 +02:00
Added image links
This commit is contained in:
@@ -1026,10 +1026,22 @@ public class HtmlHelper {
|
||||
if (alt.length() > MAX_ALT)
|
||||
alt = alt.substring(0, MAX_ALT) + "…";
|
||||
|
||||
if (!show_images && !(inline_images && isInline) && !TextUtils.isEmpty(alt))
|
||||
if (TextUtils.isEmpty(tracking))
|
||||
img.appendText("[" + alt + "]");
|
||||
else {
|
||||
if (!show_images && !(inline_images && isInline))
|
||||
if (TextUtils.isEmpty(tracking)) {
|
||||
if (TextUtils.isEmpty(alt)) {
|
||||
boolean linked = false;
|
||||
Element p = img.parent();
|
||||
while (p != null && !linked)
|
||||
if ("a".equals(p.tagName()))
|
||||
linked = true;
|
||||
else
|
||||
p = p.parent();
|
||||
if (linked)
|
||||
alt = context.getString(R.string.title_image_link);
|
||||
}
|
||||
if (!TextUtils.isEmpty(alt))
|
||||
img.appendText("[" + alt + "]");
|
||||
} else if (!TextUtils.isEmpty(alt)) {
|
||||
Element a = document.createElement("a");
|
||||
a.attr("href", tracking);
|
||||
a.text("[" + alt + "]");
|
||||
|
||||
@@ -1474,6 +1474,7 @@
|
||||
<string name="title_hint_eml">This is a summary of the content of a raw message file. Save the raw message with the save icon in the action bar to view all content.</string>
|
||||
|
||||
<string name="title_open_link">Open link</string>
|
||||
<string name="title_image_link">Image link</string>
|
||||
<string name="title_different_link">The title and the link address are different</string>
|
||||
<string name="title_tracking_link">This website might track you</string>
|
||||
<string name="title_suspicious_link">This is a suspicious link</string>
|
||||
|
||||
Reference in New Issue
Block a user