- Issue created by @John_B
- 🇬🇧United Kingdom John_B London (UK), Worthing (UK), Innsbruck (Tirol)
It seems that Html::normalize in TocBuilder.php is fixing mismatching tags when using PHP's DOMDocument class for HTML, as Drupal 9 does.
As a result, toc_api module is fixing broken HTML which would not be fixed by Drupal's core 'Fix broken HTML' filter.
However, this function is not fixing mismatching tags when using Mastermind/html5-php, used by D10's html utility.
- 🇬🇧United Kingdom John_B London (UK), Worthing (UK), Innsbruck (Tirol)
In case someone wants to use the idea I suggested in #3224559: Invalid HTML causes errors → of calling the PHP HTML Tidy extension, here is a patch which does that.