[PHP 8.4] Use DOMDocument HTML5 support when available

Created on 16 January 2024, 11 months ago

Problem/Motivation

We're using masterminds/html5 to support HTML5 parsing, especially in the filter system and Big Pipe. @berdir reported a regression (at least when profiling, less obvious when looking at raw timings when not profiling) in HTML parsing with Big Pipe.

PHP 8.4 will have native HTML5 support, so we should use that when it's available - we can put it behind a PHP version check in Drupal\Component\Utility\HTML::load(), and then drop masterminds/html5 when we require PHP 8.4 or higher (in Drupal 12).

https://wiki.php.net/rfc/domdocument_html5_parser

Steps to reproduce

Proposed resolution

Merge request link

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

πŸ“Œ Task
Status

Active

Version

11.0 πŸ”₯

Component
BaseΒ  β†’

Last updated about 14 hours ago

Created by

πŸ‡¬πŸ‡§United Kingdom catch

Live updates comments and jobs are added and updated live.
  • Performance

    It affects performance. It is often combined with the Needs profiling tag.

Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024