- 🇫🇷France andypost
As just commited 🐛 Upgrade filter system to HTML5 Fixed
TODOs
- needs to check how many parts are still affected by libxml
- triaging remaining child issues - 🇫🇷France fgm Paris, France
Just to be sure, is there no equivalent issue for whitespace in pure XML documents ? Asking for XML-RPC.
Also, is there any impact on contrib/custom filters ? Asking for Glossary 2. And Glossify may have the same question.
- 🇫🇷France andypost
XML-RPC very probably affected as extension has no maintainer https://pecl.php.net/package/xmlrpc and PHP 8.3 got a lot of dom/libxml fixes but in long run https://wiki.php.net/rfc/domdocument_html5_parser
- 🇫🇷France fgm Paris, France
@andypost : Drupal XML-RPC stopped using the XML-RPC extension around the PHP4.7 IIRC, so it doesn't matter.
However, reexamining it, we've actually changed it to use the XMLParser extension (meaning the expat parser) instead, so there is no issue about libxml.
- 🇬🇧United Kingdom longwave UK
@fgm With the move to the HTML5 parser in most cases there should be no impact on rendering or parsing HTML, but there are some edge case changes if you rely on exact string matches or significant whitespace (e.g. in tests) - see the change record for the examples we discovered in tests in core: https://www.drupal.org/node/3225468 →
- 🇫🇷France andypost
PHP 8.4 accepted HTML5 parser https://github.com/php/php-src/commit/f09340905263d0abb7cb9d60dc2dd1c1a5...
- 🇫🇷France andypost
Looks like all child issues are done so it could be marked fixed in 10.2?!
- Status changed to RTBC
about 1 year ago 10:10am 6 November 2023 - 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺
@andypost I was thinking the same thing! 😄
I just went over all the related issues that are in Drupal core and were not yet closed:
- Closed #3216912 as outdated: #3216912-19: Html::serialize adds unwanted/duplicate xml:* attributes → .
- I think #3298822 can be closed too: #3298822-13: Preserve whitespace in DOMDocument::loadHTML() calls → .
- Closed #3191041 as outdated: #3191041-13: [PP-1] PHP Warning: DOMDocument::loadHTML(): Tag drupal-media invalid in Entity, line: 34 in Drupal\Component\Utility\Html::load() → .
- Closed #2350049 as outdated: #2350049-29: filter_autop returns self closing br element with slash, lets alter to br → .
- Closed #2346989 as outdated: #2346989-31: [PP-1] 'Restrict images to this site' leads to incorrect HTML with language attribute → .
- #1388926 is still relevant but is harmless/independent of this issue: #1388926-114: Remove all references to "self-closing" void elements in core → .
I think the honor is @longwave's 🤓
- last update
about 1 year ago Patch Failed to Apply - last update
about 1 year ago Patch Failed to Apply - last update
about 1 year ago Patch Failed to Apply - Status changed to Needs work
about 1 year ago 11:40pm 10 November 2023 The Needs Review Queue Bot → tested this issue.
While you are making the above changes, we recommend that you convert this patch to a merge request → . Merge requests are preferred over patches. Be sure to hide the old patch files as well. (Converting an issue to a merge request without other contributions to the issue will not receive credit.)
- Status changed to RTBC
about 1 year ago 11:43pm 10 November 2023 - Status changed to Fixed
about 1 year ago 11:55pm 10 November 2023 - 🇬🇧United Kingdom longwave UK
Agree that all child issues have been fixed, some related issues still remain where we can clean things up but the primary case of using libxml2 for HTML parsing is no longer an issue as we are using the masterminds HTML5 library instead now.
Tried to credit everyone who made useful comments or helped move this issue forward in some way. Thanks everyone, I'm so happy that Drupal now fully supports HTML5!
Automatically closed - issue fixed for 2 weeks with no activity.
- Status changed to Fixed
4 months ago 7:24pm 24 July 2024 - 🇫🇷France andypost
Filed new issue to explore replacement of the library with new native dom extension implementation - ✨ Explore PHP 8.4 native HTML 5 parser vs html5-php Active