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 @@ -1800,9 +1800,10 @@ public final void startTag(ElementName elementName,
1800
1800
case TBODY_OR_THEAD_OR_TFOOT :
1801
1801
case TR :
1802
1802
case TD_OR_TH :
1803
- errStrayStartTag (name );
1804
1803
eltPos = findLastInTableScope ("caption" );
1805
1804
if (eltPos == TreeBuilder .NOT_FOUND_ON_STACK ) {
1805
+ assert fragment || isTemplateContents ();
1806
+ errStrayStartTag (name );
1806
1807
break starttagloop ;
1807
1808
}
1808
1809
generateImpliedEndTags ();
@@ -3275,9 +3276,11 @@ public final void endTag(ElementName elementName) throws SAXException {
3275
3276
mode = IN_TABLE ;
3276
3277
break endtagloop ;
3277
3278
case TABLE :
3278
- errTableClosedWhileCaptionOpen ();
3279
3279
eltPos = findLastInTableScope ("caption" );
3280
+
3280
3281
if (eltPos == TreeBuilder .NOT_FOUND_ON_STACK ) {
3282
+ assert fragment || isTemplateContents ();
3283
+ errStrayEndTag (name );
3281
3284
break endtagloop ;
3282
3285
}
3283
3286
generateImpliedEndTags ();
@@ -6433,10 +6436,6 @@ private void errHtmlStartTagInForeignContext(@Local String name)
6433
6436
+ "\u201D in a foreign namespace context." );
6434
6437
}
6435
6438
6436
- private void errTableClosedWhileCaptionOpen () throws SAXException {
6437
- err ("\u201C table\u201D closed but \u201C caption\u201D was still open." );
6438
- }
6439
-
6440
6439
private void errNoTableRowToClose () throws SAXException {
6441
6440
err ("No table row to close." );
6442
6441
}
You can’t perform that action at this time.
0 commit comments