Prevent empty/local image links

pull/199/head
M66B 4 years ago
parent 17997b8088
commit b2d37c3964

@ -1101,9 +1101,12 @@ public class HtmlHelper {
boolean linked = false;
Element p = img.parent();
while (p != null && !linked)
if ("a".equals(p.tagName()))
if ("a".equals(p.tagName())) {
String href = p.attr("href");
if (TextUtils.isEmpty(href) || href.equals("#"))
break;
linked = true;
else
} else
p = p.parent();
if (linked)
alt = context.getString(R.string.title_image_link);

Loading…
Cancel
Save