File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
src/main/java/org/jsoup/parser Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change 10
10
import org .jsoup .nodes .FormElement ;
11
11
import org .jsoup .nodes .Node ;
12
12
import org .jsoup .nodes .TextNode ;
13
- import org .jsoup .select .Elements ;
14
13
15
14
import javax .annotation .Nullable ;
16
15
import javax .annotation .ParametersAreNonnullByDefault ;
20
19
import java .util .List ;
21
20
22
21
import static org .jsoup .internal .StringUtil .inSorted ;
22
+ import static org .jsoup .parser .HtmlTreeBuilderState .Constants .InTableFoster ;
23
23
24
24
/**
25
25
* HTML Tree Builder; creates a DOM from Tokens.
@@ -315,7 +315,7 @@ private void insertNode(Node node) {
315
315
// if the stack hasn't been set up yet, elements (doctype, comments) go into the doc
316
316
if (stack .isEmpty ())
317
317
doc .appendChild (node );
318
- else if (isFosterInserts ())
318
+ else if (isFosterInserts () && StringUtil . inSorted ( currentElement (). normalName (), InTableFoster ) )
319
319
insertInFosterParent (node );
320
320
else
321
321
currentElement ().appendChild (node );
You can’t perform that action at this time.
0 commit comments