[wp-trac] [WordPress Trac] #39125: Customize: Video Header YouTube field has issues when whitespace is inserted at beginning or end of URL

WordPress Trac noreply at wordpress.org
Wed Dec 7 09:35:08 UTC 2016


#39125: Customize: Video Header YouTube field has issues when whitespace is
inserted at beginning or end of URL
---------------------------+--------------------
 Reporter:  davidakennedy  |       Owner:
     Type:  defect (bug)   |      Status:  new
 Priority:  normal         |   Milestone:  4.7.1
Component:  Customize      |     Version:
 Severity:  normal         |  Resolution:
 Keywords:  has-patch      |     Focuses:
---------------------------+--------------------
Changes (by tyxla):

 * keywords:   => has-patch


Comment:

 The current sanitization is using `esc_url_raw()`, which converts the
 spaces to `%20`.

 The diff I've attached introduces a new sanitization callback for the
 `external_header_video` theme mod value. That callback will first `trim()`
 the value, before escaping it with `esc_url_raw()`.

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


More information about the wp-trac mailing list