fix for SF-667 JavadocStyle checkHTML bad Extra HTML tag found errors

This commit is contained in:
Roman Ivanov 2014-02-15 08:31:50 -08:00 committed by Ivan Sopov
parent a361d17043
commit 48e77d65c6
2 changed files with 9 additions and 8 deletions

View File

@ -51,8 +51,8 @@ public class JavadocStyleCheck
private static final String EXTRA_HTML = "javadoc.extrahtml";
/** HTML tags that do not require a close tag. */
private static final Set<String> SINGLE_TAGS = ImmutableSortedSet.of("p",
"br", "li", "dt", "dd", "td", "hr", "img", "tr", "th", "td");
private static final Set<String> SINGLE_TAGS = ImmutableSortedSet.of(
"br", "li", "dt", "dd", "hr", "img", "p", "td", "tr", "th");
/** HTML tags that are allowed in java docs.
* From http://www.w3schools.com/tags/default.asp
@ -60,11 +60,12 @@ public class JavadocStyleCheck
*/
private static final Set<String> ALLOWED_TAGS = ImmutableSortedSet.of(
"a", "abbr", "acronym", "address", "area", "b", "bdo", "big",
"blockquote", "br", "caption", "cite", "code", "colgroup", "del",
"div", "dfn", "dl", "em", "fieldset", "h1", "h2", "h3", "h4", "h5",
"h6", "hr", "i", "img", "ins", "kbd", "li", "ol", "p", "pre", "q",
"samp", "small", "span", "strong", "style", "sub", "sup", "table",
"tbody", "td", "tfoot", "th", "thead", "tr", "tt", "ul");
"blockquote", "br", "caption", "cite", "code", "colgroup", "dd",
"del", "div", "dfn", "dl", "dt", "em", "fieldset", "h1", "h2",
"h3", "h4", "h5", "h6", "hr", "i", "img", "ins", "kbd", "li",
"ol", "p", "pre", "q", "samp", "small", "span", "strong",
"style", "sub", "sup", "table", "tbody", "td", "tfoot", "th",
"thead", "tr", "tt", "ul");
/** The scope to check. */
private Scope mScope = Scope.PRIVATE;

View File

@ -580,7 +580,7 @@ public boolean isSomething()
Check for allowed HTML tags. The list of allowed HTML tags
is "a", "abbr", "acronym", "address", "area", "b", "bdo",
"big", "blockquote", "br", "caption", "cite", "code",
"colgroup", "del", "div", "dfn", "dl", "em", "fieldset",
"colgroup", "dd", "del", "div", "dfn", "dl", "dt", "em", "fieldset",
"h1" to "h6", "hr", "i", "img", "ins", "kbd", "li", "ol",
"p", "pre", "q", "samp", "small", "span", "strong", "sub",
"sup", "table", "tbody", "td", "tfoot", "th", "thread",