[wp-trac] [WordPress Trac] #63854: Handle a non-string passed to WP_HTML_Tag_Processor gracefully
WordPress Trac
noreply at wordpress.org
Thu Aug 21 01:43:22 UTC 2025
#63854: Handle a non-string passed to WP_HTML_Tag_Processor gracefully
--------------------------------------+---------------------
Reporter: kraftbj | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: 6.9
Component: HTML API | Version: 6.2
Severity: normal | Resolution:
Keywords: has-patch has-unit-tests | Focuses:
--------------------------------------+---------------------
Comment (by kraftbj):
@westonruter I agree with you (
https://github.com/Automattic/jetpack/pull/44874 to pass through the value
when it's unexpected instead of trying to process it ).
I'm thinking of a chance in Core since there is a strict type on the
method to return a value out of it, but constructing (and interacting, at
least how we are in the Jetpack CDN code) with the tag processor with an
invalid construction arg occurs without complaint.
So, I agree that the filtering function should be defensive, and Core
could be more defensive too.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/63854#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list