From 9ca5a3687bd2e6e42ed9d5199b2cfb1dbd6dbdc2 Mon Sep 17 00:00:00 2001 From: Christian Castelli Date: Tue, 5 Mar 2024 16:58:42 +0100 Subject: [PATCH] fix: checking that node has property name (#399) Co-authored-by: Christian Castelli --- library/HTMLPurifier/ChildDef/Table.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/library/HTMLPurifier/ChildDef/Table.php b/library/HTMLPurifier/ChildDef/Table.php index 67c7e953..d92205b3 100644 --- a/library/HTMLPurifier/ChildDef/Table.php +++ b/library/HTMLPurifier/ChildDef/Table.php @@ -190,6 +190,9 @@ class HTMLPurifier_ChildDef_Table extends HTMLPurifier_ChildDef $current_tr_tbody = null; foreach($content as $node) { + if (!isset($node->name)) { + continue; + } switch ($node->name) { case 'tbody': $current_tr_tbody = null;