[wp-trac] [WordPress Trac] #64394: HTML Processor may error processing nested HTML structures
WordPress Trac
noreply at wordpress.org
Wed Dec 10 17:09:45 UTC 2025
#64394: HTML Processor may error processing nested HTML structures
--------------------------------------+------------------------------
Reporter: jonsurrell | Owner: (none)
Type: defect (bug) | Status: assigned
Priority: normal | Milestone: Awaiting Review
Component: HTML API | Version: 6.4
Severity: normal | Resolution:
Keywords: has-patch has-unit-tests | Focuses:
--------------------------------------+------------------------------
Comment (by dmsnell):
> For example <table><td> is apparently 2 tags, but when processed via
::create_fragment() this actually consumes a maximum of 6 bookmarks
This would correspond with the actual DOM nesting though, so I think
that’s fine.
Even if we leave some buffer, for example, setting a MAX_BOOKMARKS count
of something like 600 or 1000, we will then have plenty of opportunity to
parse all documents a browser would parse.
The bookmark limit was always meant to be tunable and //mostly// serve to
prevent infinite loops and needlessly wasteful code. There is no intrinsic
constraint they are guarding.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/64394#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list