From 9b0419a214d6c20b25de615653cc07597719fb1b Mon Sep 17 00:00:00 2001 From: Valentin Kunz Date: Thu, 12 May 2016 14:29:41 +0000 Subject: don't close optgroup when followed by an option Make sure options are children of optgroup, not the parent select. Otherwise we end up with a bunch of empty optgroups. --- src/HTML5/Parser/TreeBuildingRules.php | 1 - 1 file changed, 1 deletion(-) (limited to 'src/HTML5/Parser') diff --git a/src/HTML5/Parser/TreeBuildingRules.php b/src/HTML5/Parser/TreeBuildingRules.php index 2af3c66..6236208 100644 --- a/src/HTML5/Parser/TreeBuildingRules.php +++ b/src/HTML5/Parser/TreeBuildingRules.php @@ -76,7 +76,6 @@ class TreeBuildingRules case 'option': return $this->closeIfCurrentMatches($new, $current, array( 'option', - 'optgroup' )); case 'tr': return $this->closeIfCurrentMatches($new, $current, array( -- cgit v1.2.3