[wp-trac] [WordPress Trac] #35305: do_meta_boxes() does not display correctly with screen names that contain charaters outside sanatize_key()'s limits
WordPress Trac
noreply at wordpress.org
Mon Jun 20 13:32:41 UTC 2016
#35305: do_meta_boxes() does not display correctly with screen names that contain
charaters outside sanatize_key()'s limits
------------------------------------------+-----------------------------
Reporter: GregRoss | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Future Release
Component: Options, Meta APIs | Version: 4.4
Severity: normal | Resolution:
Keywords: needs-patch needs-unit-tests | Focuses:
------------------------------------------+-----------------------------
Comment (by GregRoss):
@MikeHansenMe I doubt the effort to try and resolve this through code is
worth it.
Option 1 is easy enough to do, just remove the `sanitize_key()` call in
`WP_Screen` object and it works, however I'm sure there must be a reason
for it to be there so likely other things will break. Replacing
`sanitize_key()` with something more permissive would only be a partial
solution so not a very good option.
Option 2 could break a lot of plugins for a corner case with
`do_meta_boxes()`. That seems like a bad tradeoff.
I think the best solution is to update the docs for both
`add_menu_page()`/`add_submenu_page()` and
`do_meta_boxes()`/`add_meta_box()` to indicate the proper format for the
menu_slug/screen_id.
I've attached a patch which updates the doc blocks to reflect this.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/35305#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list