Description
In HtmlHandler.java, the requiresCloseTag() method only looks the tag name in the Map, without considering the char case:
public static boolean requiresCloseTag(final String name)
{ return doesNotRequireCloseTag.get(name) == null; }Because the keys are all lower case:
static
{ // Tags which are allowed not be closed in HTML doesNotRequireCloseTag.put("p", Boolean.TRUE); doesNotRequireCloseTag.put("br", Boolean.TRUE); doesNotRequireCloseTag.put("img", Boolean.TRUE); doesNotRequireCloseTag.put("input", Boolean.TRUE); doesNotRequireCloseTag.put("hr", Boolean.TRUE); doesNotRequireCloseTag.put("link", Boolean.TRUE); doesNotRequireCloseTag.put("meta", Boolean.TRUE); }it will fail if uppercase tag names are used in the markup.
I've verified that it dies with the following simple markup:
<html>
<body>
<BR>
</body>
</html>