Commit a1b4e08a21 for wordpress.org
commit a1b4e08a218cd645b1f0694196084b8137e43834
Author: jonsurrell <jonsurrell@git.wordpress.org>
Date: Tue Oct 6 09:40:45 2026 +0000
HTML API: Improve character reference decoding performance.
Improve the performance of `WP_HTML_Decoder::decode()` on strings containing ampersands that do not start a character reference.
Developed in: https://github.com/WordPress/wordpress-develop/pull/13986
Props serhatsoylu06, westonruter, jonsurrell.
Fixes #66241.
Built from https://develop.svn.wordpress.org/trunk@64124
git-svn-id: http://core.svn.wordpress.org/trunk@63280 1a063a9b-81f0-0310-95a4-ce76da25c4cd
diff --git a/wp-includes/html-api/class-wp-html-decoder.php b/wp-includes/html-api/class-wp-html-decoder.php
index cc3dde6e7e..31ed56808e 100644
--- a/wp-includes/html-api/class-wp-html-decoder.php
+++ b/wp-includes/html-api/class-wp-html-decoder.php
@@ -205,7 +205,7 @@ class WP_HTML_Decoder {
continue;
}
- ++$at;
+ $at = $next_character_reference_at + 1;
}
if ( 0 === $was_at ) {
diff --git a/wp-includes/version.php b/wp-includes/version.php
index c118f4cf5d..042223cc46 100644
--- a/wp-includes/version.php
+++ b/wp-includes/version.php
@@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
-$wp_version = '7.2-alpha-64123';
+$wp_version = '7.2-alpha-64124';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.