[wp-trac] [WordPress Trac] #32816: No or inadequate Custom Link URL validation

WordPress Trac noreply at wordpress.org
Fri Dec 2 19:49:13 UTC 2016


#32816: No or inadequate Custom Link URL validation
----------------------------------------+-----------------------------
 Reporter:  JanR                        |       Owner:
     Type:  enhancement                 |      Status:  new
 Priority:  normal                      |   Milestone:  4.8
Component:  Customize                   |     Version:  4.3
 Severity:  normal                      |  Resolution:
 Keywords:  needs-patch good-first-bug  |     Focuses:  ui, javascript
----------------------------------------+-----------------------------
Changes (by westonruter):

 * keywords:  needs-patch => needs-patch good-first-bug
 * milestone:  Future Release => 4.8


Comment:

 We can do this now easily with setting validation, where the `sanitize`
 method for `WP_Customize_Nav_Menu_Item_Setting` class can return a
 `WP_Error` when the return value of `esc_url_raw()` is empty. This will
 cause the setting to be blocked from being saved and the error message
 will be displayed in the control.

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


More information about the wp-trac mailing list