AbstractSubstituteAttrProcessor also removes the attribute "title"
[juplo-dialect] / src / main / java / de / juplo / thymeleaf / AbstractSubstituteAttrProcessor.java
index 0348aea..6274016 100644 (file)
@@ -49,6 +49,7 @@ public abstract class AbstractSubstituteAttrProcessor extends AbstractAttrProces
       // We must not clone the processors, because we remove attributes
       Element substituteElement =
           element.cloneElementNodeWithNewName(element, substituteName, false);
+      // Remove attributes, that are not allowed for <span> or <strong>
       substituteElement.removeAttribute("charset");
       substituteElement.removeAttribute("th:charset");
       substituteElement.removeAttribute("coords");
@@ -69,6 +70,10 @@ public abstract class AbstractSubstituteAttrProcessor extends AbstractAttrProces
       substituteElement.removeAttribute("th:target");
       substituteElement.removeAttribute("type");
       substituteElement.removeAttribute("th:type");
+      // Also remove the title-attribute, because the mouse-over is confusing
+      substituteElement.removeAttribute("title");
+      substituteElement.removeAttribute("th:title");
+      // Replace the element
       element.clearChildren();
       element.addChild(substituteElement);
       element.getParent().extractChild(element);