mirror of
https://github.com/M66B/FairEmail.git
synced 2025-12-26 07:32:08 +01:00
Fixed image links
This commit is contained in:
@@ -82,6 +82,8 @@ public class HtmlHelper {
|
||||
ol.append("<br>");
|
||||
|
||||
for (Element img : document.select("img")) {
|
||||
img.prependElement("br");
|
||||
|
||||
boolean linked = false;
|
||||
for (Element parent : img.parents())
|
||||
if ("a".equals(parent.tagName())) {
|
||||
@@ -93,18 +95,12 @@ public class HtmlHelper {
|
||||
if (src.startsWith("http://") || src.startsWith("https://")) {
|
||||
Element a = document.createElement("a");
|
||||
a.attr("href", src);
|
||||
a.appendChild(img.clone());
|
||||
img.replaceWith(a);
|
||||
a.appendChild(img);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (Element img : document.select("img")) {
|
||||
Element p = document.createElement("p");
|
||||
img.replaceWith(p);
|
||||
p.appendChild(img);
|
||||
}
|
||||
|
||||
if (!showQuotes)
|
||||
for (Element quote : document.select("blockquote"))
|
||||
quote.html("…");
|
||||
|
||||
Reference in New Issue
Block a user