[wp-trac] [WordPress Trac] #25147: Allow base64 data:image with Menu Icons

WordPress Trac noreply at wordpress.org
Thu Dec 5 04:08:45 UTC 2013


#25147: Allow base64 data:image with Menu Icons
------------------------------------+-----------------------
 Reporter:  wpsmith                 |       Owner:
     Type:  enhancement             |      Status:  reopened
 Priority:  high                    |   Milestone:  3.8
Component:  Administration          |     Version:
 Severity:  minor                   |  Resolution:
 Keywords:  has-patch dev-feedback  |
------------------------------------+-----------------------

Comment (by helen):

 [attachment:25147.2.diff​] allows a data:image URI resource or a Dashicon
 to be specified for the menu icon in both `register_post_type()` and
 `add_menu_page()`. Dashicons are specified using the helper class, e.g.
 `dashicon-piechart`.

 Specifying the data:image URI directly in PHP isn't insecure, as if you're
 doing stuff in PHP you can do a lot of other things, but we may want to
 think about how this could affect plugins that have a GUI for custom post
 type management.

 [https://irclogs.wordpress.org/chanlog.php?channel=wordpress-
 dev&day=2013-12-05&sort=asc#m744561 Some IRC discussion / thoughts], in
 particular:

 > nacin: wondering if we should have some kind of esc_menu_icon() function
 to handle all of this validation + a filter
 > nacin: wp_parse_menu_icon() perhaps

--
Ticket URL: <http://core.trac.wordpress.org/ticket/25147#comment:9>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list