X-Git-Url: https://juplo.de/gitweb/?p=juplo-dialect;a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fde%2Fjuplo%2Fthymeleaf%2FActiveElementProcessor.java;h=46725e199803bb520dd7813ab18e817203901274;hp=9f714a08fa52544f2d1ffa2b772e5472be4c3b62;hb=8f5433b0625ba08b380ba757ee6b090945f8cf2c;hpb=d221272c806efad874dafac1a9197f717ce3984f diff --git a/src/main/java/de/juplo/thymeleaf/ActiveElementProcessor.java b/src/main/java/de/juplo/thymeleaf/ActiveElementProcessor.java index 9f714a0..46725e1 100644 --- a/src/main/java/de/juplo/thymeleaf/ActiveElementProcessor.java +++ b/src/main/java/de/juplo/thymeleaf/ActiveElementProcessor.java @@ -56,8 +56,29 @@ public class ActiveElementProcessor extends AbstractProcessor element.removeAttribute(name); if ((Boolean)expression.execute(configuration, arguments)) { + // We must not clone the processors, because we remove attributes Element strong = - element.cloneElementNodeWithNewName(element, "strong", true); + element.cloneElementNodeWithNewName(element, "strong", false); + strong.removeAttribute("charset"); + strong.removeAttribute("th:charset"); + strong.removeAttribute("coords"); + strong.removeAttribute("href"); + strong.removeAttribute("th:href"); + strong.removeAttribute("hreflang"); + strong.removeAttribute("th:hreflang"); + strong.removeAttribute("media"); + strong.removeAttribute("th:media"); + strong.removeAttribute("name"); + strong.removeAttribute("th:name"); + strong.removeAttribute("rel"); + strong.removeAttribute("th:rel"); + strong.removeAttribute("ref"); + strong.removeAttribute("th:ref"); + strong.removeAttribute("shape"); + strong.removeAttribute("target"); + strong.removeAttribute("th:target"); + strong.removeAttribute("type"); + strong.removeAttribute("th:type"); element.clearChildren(); element.addChild(strong); element.getParent().extractChild(element);