File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed
src/nu/validator/htmlparser/impl Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -1970,9 +1970,10 @@ public final void startTag(ElementName elementName,
1970
1970
case TBODY_OR_THEAD_OR_TFOOT :
1971
1971
case TR :
1972
1972
case TD_OR_TH :
1973
- errStrayStartTag (name );
1974
1973
eltPos = findLastInTableScope ("caption" );
1975
1974
if (eltPos == TreeBuilder .NOT_FOUND_ON_STACK ) {
1975
+ assert fragment || isTemplateContents ();
1976
+ errStrayStartTag (name );
1976
1977
break starttagloop ;
1977
1978
}
1978
1979
generateImpliedEndTags ();
@@ -3464,9 +3465,11 @@ public final void endTag(ElementName elementName) throws SAXException {
3464
3465
mode = IN_TABLE ;
3465
3466
break endtagloop ;
3466
3467
case TABLE :
3467
- errTableClosedWhileCaptionOpen ();
3468
3468
eltPos = findLastInTableScope ("caption" );
3469
+
3469
3470
if (eltPos == TreeBuilder .NOT_FOUND_ON_STACK ) {
3471
+ assert fragment || isTemplateContents ();
3472
+ errStrayEndTag (name );
3470
3473
break endtagloop ;
3471
3474
}
3472
3475
generateImpliedEndTags ();
@@ -6680,10 +6683,6 @@ private void errHtmlStartTagInForeignContext(@Local String name)
6680
6683
+ "\u201D in a foreign namespace context." );
6681
6684
}
6682
6685
6683
- private void errTableClosedWhileCaptionOpen () throws SAXException {
6684
- err ("\u201C table\u201D closed but \u201C caption\u201D was still open." );
6685
- }
6686
-
6687
6686
private void errNoTableRowToClose () throws SAXException {
6688
6687
err ("No table row to close." );
6689
6688
}
You can’t perform that action at this time.
0 commit comments