D10 regression when handling faulty HTML

Created on 24 January 2024, 5 months ago
Updated 29 February 2024, 4 months ago

Problem/Motivation

On Drupal 9 faulty does not break the TOC. On D10 it does. It is fine on D9 because it was fixed in #3224559: Invalid HTML causes errors β†’ .

That fix no longer works because Drupal has changed the HTML serializer. If core/lib/Drupal/Component/Utility/Html.php is replaced by a copy from D9, the problem clears up. I have not worked out exactly what has changed, but the core issue where the change was made, with links to the commit, is πŸ› Upgrade filter system to HTML5 Fixed .

Steps to reproduce

Take a node with a TOC including an <h3> heading. Keep opening tag h3, and change closing tag to </h2>.

Proposed resolution

Work out where the problem lies, and look for ways to update the fix in #3224559: Invalid HTML causes errors β†’ .

πŸ› Bug report
Status

Active

Version

1.0

Component

Code

Created by

πŸ‡¬πŸ‡§United Kingdom John_B London (UK), Worthing (UK), Innsbruck (Tirol)

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.69.0 2024