Small improvement

This commit is contained in:
M66B 2019-03-30 17:21:59 +01:00
parent cce3e83ff8
commit b4160a73f7
1 changed files with 4 additions and 0 deletions

View File

@ -243,6 +243,8 @@ public class HtmlHelper {
String outer = parent.outerHtml(); String outer = parent.outerHtml();
parent.tagName("span"); parent.tagName("span");
for (Attribute attr : parent.attributes().asList())
parent.attributes().remove(attr.getKey());
parent.html(outer); parent.html(outer);
parent.appendChild(div); parent.appendChild(div);
@ -252,6 +254,8 @@ public class HtmlHelper {
if (!linked) { if (!linked) {
img.tagName("div"); img.tagName("div");
for (Attribute attr : img.attributes().asList())
img.attributes().remove(attr.getKey());
img.html(div.html()); img.html(div.html());
} }
} }