X-Git-Url: https://juplo.de/gitweb/?p=juplo-dialect;a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fde%2Fjuplo%2Fthymeleaf%2FInactiveElementProcessor.java;h=cd0585452608d5a81942d0b6aaf769c0b23b79b3;hp=621a764690eed009bc0e02d89cfc6db3b8219a3e;hb=8f5433b0625ba08b380ba757ee6b090945f8cf2c;hpb=d221272c806efad874dafac1a9197f717ce3984f diff --git a/src/main/java/de/juplo/thymeleaf/InactiveElementProcessor.java b/src/main/java/de/juplo/thymeleaf/InactiveElementProcessor.java index 621a764..cd05854 100644 --- a/src/main/java/de/juplo/thymeleaf/InactiveElementProcessor.java +++ b/src/main/java/de/juplo/thymeleaf/InactiveElementProcessor.java @@ -56,8 +56,29 @@ public class InactiveElementProcessor 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, "span", true); + element.cloneElementNodeWithNewName(element, "span", 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);