[wp-trac] [WordPress Trac] #60360: Make WP_Theme_JSON to sanitize data on indexed arrays
WordPress Trac
noreply at wordpress.org
Fri Jan 26 21:20:39 UTC 2024
#60360: Make WP_Theme_JSON to sanitize data on indexed arrays
-------------------------+-------------------------------------------------
Reporter: | Owner: (none)
mmaattiiaass |
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Editor | Version: trunk
Severity: normal | Keywords: gutenberg-merge has-patch has-unit-
Focuses: | tests
-------------------------+-------------------------------------------------
Currently, WP_Theme_JSON sanitization is not able to sanitize data
contained on indexed arrays. So certain data from theme.json, for example,
settings.typography.fontFamilies which is a JSON array, cannot be
sanitized. Why? because when parsing the JSON data WP_Theme_JSON
translates JSON arrays into PHP indexed arrays and the class is not
capable of sanitizing that kind of data.
I think it would be useful to add nested indexed array schema sanitization
capabilities to the WP_Theme_JSON class. For that reason, this ticket is
aimed to bring that capability into core from WP_Theme_JSON_Gutenberg.
Syncs https://github.com/WordPress/gutenberg/pull/56447
--
Ticket URL: <https://core.trac.wordpress.org/ticket/60360>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list