From 472c3d082ae6d6bebf44815c76871502eae88f02 Mon Sep 17 00:00:00 2001 From: Kai Moritz Date: Wed, 17 Feb 2016 11:46:29 +0100 Subject: [PATCH] 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. --- .../de/juplo/thymeleaf/AbstractSubstituteAttrProcessor.java | 5 +++++ 1 file changed, 5 insertions(+) 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); -- 2.20.1