HTML API: Increase HTML Processor bookmark limit to 10,000.

The limit was overly conservative and bookmark exhaustion may occur on realistic documents. The increased limit allows documents with much greater depth to be safely processed.

The limit is increased from 100 to 10,000.

Developed in https://github.com/WordPress/wordpress-develop/pull/10820.

Follow-up to [61755].

Props jonsurrell, dmsnell, westonruter.
See #64394.

Built from https://develop.svn.wordpress.org/trunk@61756


git-svn-id: http://core.svn.wordpress.org/trunk@61062 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
jonsurrell
2026-02-27 15:18:46 +00:00
parent 72d3fb0034
commit 8cd3628f37
2 changed files with 3 additions and 2 deletions

View File

@@ -149,10 +149,11 @@ class WP_HTML_Processor extends WP_HTML_Tag_Processor {
* so this class constant from the Tag Processor is overwritten.
*
* @since 6.4.0
* @since 7.0.0 Increased from 100 to 10,000
*
* @var int
*/
const MAX_BOOKMARKS = 100;
const MAX_BOOKMARKS = 10_000;
/**
* Holds the working state of the parser, including the stack of

View File

@@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
$wp_version = '7.0-beta2-61755';
$wp_version = '7.0-beta2-61756';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.