[wp-trac] [WordPress Trac] #41810: Add the sanitization function for checkboxes
WordPress Trac
noreply at wordpress.org
Wed Sep 6 20:14:00 UTC 2017
#41810: Add the sanitization function for checkboxes
-------------------------------------------------+-------------------------
Reporter: Mirucon | Owner:
Type: feature request | Status: new
Priority: normal | Milestone: Awaiting
Component: Options, Meta APIs | Review
Severity: normal | Version: trunk
Keywords: has-patch needs-testing 2nd-opinion | Resolution:
| Focuses:
-------------------------------------------------+-------------------------
Changes (by SergeyBiryukov):
* keywords: has-patch needs-testing => has-patch needs-testing 2nd-opinion
* component: General => Options, Meta APIs
Comment:
As noted above, checkboxes and radios can have custom values, they're not
really different from text fields in that regard, so
`sanitize_text_field()` can be used on them.
[attachment:41810.2.diff] looks correct to me, I guess the question is
whether a wrapper like this with a semantic name specific to checkboxes
and radios is really needed. I don't have a strong opinion at the moment.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/41810#comment:9>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list