From 84a8a71c61e071f74da4a2719f49e78720b8c4ed Mon Sep 17 00:00:00 2001 From: "Michael[tm] Smith" Date: Wed, 5 Oct 2022 21:21:15 +0900 Subject: [PATCH] Make trailing-slash-on-void-elements message not depend on profile code --- .../htmlparser/impl/ErrorReportingTokenizer.java | 9 --------- src/nu/validator/htmlparser/impl/Tokenizer.java | 11 ----------- src/nu/validator/htmlparser/impl/TreeBuilder.java | 4 +--- 3 files changed, 1 insertion(+), 23 deletions(-) diff --git a/src/nu/validator/htmlparser/impl/ErrorReportingTokenizer.java b/src/nu/validator/htmlparser/impl/ErrorReportingTokenizer.java index 6c8e7617..77dc9090 100644 --- a/src/nu/validator/htmlparser/impl/ErrorReportingTokenizer.java +++ b/src/nu/validator/htmlparser/impl/ErrorReportingTokenizer.java @@ -134,15 +134,6 @@ public void setErrorProfile(HashMap errorProfileMap) { this.errorProfileMap = errorProfileMap; } - /** - * Gets the errorProfile. - * - * @param errorProfile - */ - @Override public HashMap getErrorProfile() { - return errorProfileMap; - } - /** * Reports on an event based on profile selected. * diff --git a/src/nu/validator/htmlparser/impl/Tokenizer.java b/src/nu/validator/htmlparser/impl/Tokenizer.java index 1fa44b87..a197757a 100755 --- a/src/nu/validator/htmlparser/impl/Tokenizer.java +++ b/src/nu/validator/htmlparser/impl/Tokenizer.java @@ -35,8 +35,6 @@ package nu.validator.htmlparser.impl; -import java.util.HashMap; - import org.xml.sax.ErrorHandler; import org.xml.sax.Locator; import org.xml.sax.ext.Locator2; @@ -688,15 +686,6 @@ public ErrorHandler getErrorHandler() { return this.errorHandler; } - /** - * Gets the errorProfile. - * - * @param errorProfile - */ - public HashMap getErrorProfile() { - return null; - } - /** * Sets the commentPolicy. * diff --git a/src/nu/validator/htmlparser/impl/TreeBuilder.java b/src/nu/validator/htmlparser/impl/TreeBuilder.java index 0f5c41da..f0b70c0c 100644 --- a/src/nu/validator/htmlparser/impl/TreeBuilder.java +++ b/src/nu/validator/htmlparser/impl/TreeBuilder.java @@ -2886,9 +2886,7 @@ public final void startTag(ElementName elementName, if (selfClosing) { errSelfClosing(); // [NOCPP[ - } else if (wasSelfClosing && voidElement - && tokenizer.getErrorProfile() != null - && tokenizer.getErrorProfile().get("html-strict") != null) { + } else if (wasSelfClosing && voidElement) { warn("Trailing slash on void elements has no effect and interacts" + " badly with unquoted attribute values."); // ]NOCPP]