Fixed displaying inline images

This commit is contained in:
M66B 2019-03-12 18:44:32 +00:00
parent b0bac1ed77
commit 10edc5a6cd
1 changed files with 3 additions and 2 deletions

View File

@ -207,14 +207,15 @@ public class HtmlHelper {
} }
if (linked) if (linked)
div.appendChild(img); div.appendChild(img.clone());
else { else {
Element a = document.createElement("a"); Element a = document.createElement("a");
a.attr("href", uri.toString()); a.attr("href", uri.toString());
a.appendChild(img.clone()); a.appendChild(img.clone());
div.appendChild(a); div.appendChild(a);
} }
} } else
div.appendChild(img.clone());
if (!TextUtils.isEmpty(alt)) { if (!TextUtils.isEmpty(alt)) {
div.appendElement("br"); div.appendElement("br");