[wp-trac] [WordPress Trac] #49960: REST API: Support sanitize callbacks for nested properties

WordPress Trac noreply at wordpress.org
Thu Apr 8 15:53:33 UTC 2021


#49960: REST API: Support sanitize callbacks for nested properties
------------------------------------------+------------------------------
 Reporter:  ocean90                       |       Owner:  (none)
     Type:  enhancement                   |      Status:  new
 Priority:  normal                        |   Milestone:  Awaiting Review
Component:  REST API                      |     Version:
 Severity:  normal                        |  Resolution:
 Keywords:  needs-patch needs-unit-tests  |     Focuses:
------------------------------------------+------------------------------
Changes (by ocean90):

 * keywords:  needs-patch needs-unit-tests reporter-feedback => needs-patch
     needs-unit-tests


Comment:

 @TimothyBlynJacobs Since I just stumbled upon this again, the most common
 so far is limiting a field to only plain strings without any HTML like
 `sanitize_text_field()` (or `sanitize_textarea_field()` does for us.
 Maybe it's common enough to be added as a default `text-field` format?

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/49960#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list