From dc4e269022ebbae0767d8f790a29d6be1835fe1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20B=C3=B6hm?= <188768+fb55@users.noreply.github.com> Date: Mon, 8 Nov 2021 22:31:38 +0000 Subject: [PATCH] fix: End tags in the 'in row' insertion mode were not properly ignored The condition would always be `true`. --- packages/parse5/lib/parser/index.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/packages/parse5/lib/parser/index.js b/packages/parse5/lib/parser/index.js index 19a12e321..31462c48f 100644 --- a/packages/parse5/lib/parser/index.js +++ b/packages/parse5/lib/parser/index.js @@ -3070,8 +3070,13 @@ function endTagInRow(p, token) { } default: if ( - (tn !== $.BODY && tn !== $.CAPTION && tn !== $.COL && tn !== $.COLGROUP) || - (tn !== $.HTML && tn !== $.TD && tn !== $.TH) + tn !== $.BODY && + tn !== $.CAPTION && + tn !== $.COL && + tn !== $.COLGROUP && + tn !== $.HTML && + tn !== $.TD && + tn !== $.TH ) { endTagInTable(p, token); }