WordPress 6.9 brings an abundance of quiet improvements to the HTML API. Updates in this release mostly represent applications of the HTML API to existing code in Core; these updates increase WordPress’ reliability, improve its security hardening, and reduce maintenance burden on the project.

Major Updates WP_HTML_Processor​::​serialize_token() is now public.

The HTML Processor’s serialize_token() method returns a fully-normalized and well-formed representation of the currently-matched token. It was introduced in #62036 for WordPress 6.7 as a private method which performs the heavy-lifting for how the HTML API turns “junk” inputs into equivalent well-formed outputs. For example:

$html = '5 < 8

Click here to continue reading this article.