From: Kai Moritz Date: Wed, 17 Feb 2016 10:46:29 +0000 (+0100) Subject: AbstractSubstituteAttrProcessor also removes the attribute "title" X-Git-Tag: juplo-dialect-1.0.0~6 X-Git-Url: http://juplo.de/gitweb/?p=juplo-dialect;a=commitdiff_plain;h=472c3d082ae6d6bebf44815c76871502eae88f02 AbstractSubstituteAttrProcessor also removes the attribute "title" The attribute "title" is allowed for the tags and , but the resulting mouse-over-effect is confusing, so it is removed as well. --- diff --git a/src/main/java/de/juplo/thymeleaf/AbstractSubstituteAttrProcessor.java b/src/main/java/de/juplo/thymeleaf/AbstractSubstituteAttrProcessor.java index 0348aea..6274016 100644 --- a/src/main/java/de/juplo/thymeleaf/AbstractSubstituteAttrProcessor.java +++ b/src/main/java/de/juplo/thymeleaf/AbstractSubstituteAttrProcessor.java @@ -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 or 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);